> on lines 1 and 3 I put alerts - I'm confused as where the res variable > in the function comes from - since res does not exist before the > function in the code how can it be a variable in the function?
You're giving jQuery.ajax() a callback function as the 4th arg. When that function is called it is passed the XMLHttpRequest and the status. Take a look at onreadystatechange in the source code. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/