Okay... I'm an idiot. so the data gets assigned to the form scope because it's using post. duh. okay. I'm still not getting my expected results, but I'll work on that. Thanks.

Chris

Christopher Jordan wrote:
Hi folks,

Rey Bango turned me on to jQuery, and I'm trying to use it right now pretty much for the first time. I'm trying to make an ajax call to my ColdFusion server, and I'm a little confused by my results. Rey gave me a bit of sample code on a different list. Regardless of what my intended end result is, I'd just like the called page to return properly. I don't think I'm calling it right. Here's my code:

<CFSet ClientNumberList="172104|188549|111304|169080|028267|203347">
<CFOutput>
<html>
    <head>
        <script type="text/_javascript_" src=""></script>
        <script type="text/_javascript_">
            // Your code goes here
            $(document).ready(function(){
                // Your code here
                var i,IDList;
                IDList = "#ClientNumberList#";
                IDList = IDList.split("|");
                for(i = 0; i < 1; i++){ // ignore the fact that I'm only looping one time here.
                    $.ajax({
                        type: "POST",
                        url: "MyJQueryTest.cfm",
                        data: "ClientID=" + IDList[i],
                        dataType: "html",
                        success: function(msg){
                            $("##searchResults" ).append(msg);
                        }
                    });   
                }
            });
          </script>
    </head>
    <body>
        <table width="100%" border="1" class="stripeMe" id="searchResults">
        <thead>
            <tr><th>My Sample Table</th></tr>
        </thead>
        <tbody>
            <tr><td>Row 1</td></tr>
        </tbody>
        </table>
    </body>
</html>
</CFOutput>

I keep getting an error in my logs that says: "variable ClientID is undefined in URL". Okay so maybe I misunderstood the point of the "data" parameter to the .ajax method. Can anybody see what I might be doing wrong here?

Thanks,
Chris

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to