Chris,

If the error that you're getting is in the CF logs, then its because 
you're using the wrong scope. Remember, you're Ajax call is doing a 
"post" so use the "form" scope.

Rey

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="/include/js/jquery.js"></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
> [email protected]
> http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to