Convert JS to JQuery

Posted by Ajay.Kalol under jQuery on 8/6/2012 | Points: 10 | Views : 1119 | Status : [Member] | Replies : 1
 var request = new XMLHttpRequest();
request.open("GET", strURL, false)
request.send(null);

if (request.responseText != '') {
alert(request.responseText);
}


Hello,
what is equivalent of this code in Jquery???

Ajay
ajaypatelfromsanthal.blogspot.in



Responses

Posted by: Sheonarayan on: 8/7/2012 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
I think you do not need to find the equivalent of above code snippet in jQuery, just use jQuery ajax methods like .ajax, .post, .get or .load. Read about some of these method in my article http://www.dotnetfunda.com/articles/article1123-partial-page-refresh-using-jquery.aspx.

These jQuery ajax method does all above work for you internally.

Hope this helps.
Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Ajay.Kalol, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response