I'm using some of the code that was in the tutorial to make an Ajax call 
to a script. I used FireBug to see what the called script is sending 
back and it returns this:

<?xml version="1.0" encoding="UTF-8"?>
<MyRoot>The value of testVar is True.</MyRoot>

Here's my JQuery code:

<script type="text/javascript">
$(document).ready(function() {
        var ratingMarkup = ["Please rate: "];
        for (var i=1; i <= 5; i++) {
                ratingMarkup[ratingMarkup.length] = "<a href='#'>" + i + "</a> 
";
        }
        
        var container = $("#rating");
        container.append( ratingMarkup.join('') );
        
        container.find("a").click( function(e) {
                e.preventDefault();
                
                $.ajax({ type: "GET",
                                 url: "test.cfm",
                                 dataType: "xml",
                                 success: function(msg){ alert( "Data Saved: " 
+ $( "MyRoot", msg 
).text() ); }
                          });
                        
        } );    
        
});
</script>

The problem that I'm having is that the alert() box simply returns the 
message "Data Saved:" without the corresponding text retrieved from the 
script.

Any help would be appreciated.

Thanks,

Rey...

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

Reply via email to