I have the following piece of code for XMLHttpRequest. I want to write the jQuery equivalent for the same. Since I am new to jQuery, any help would be great!!
<body> <script type="text/javascript"> function ajaxFunction() { var xmlhttp; xmlhttp=new XMLHttpRequest(); } xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState==4) { document.form1.time.value=xmlhttp.responseText; } } xmlhttp.open("GET"," https://ondemand.abc.com/xyz/sessionServlet ",true); xmlhttp.send(null); } </script> <form id="form1" runat="server"> <div> Name: <input type="text" name="username" onkeyup="ajaxFunction();" /> Time: <input type="text" name="time" /> </div> </form> </body> And when I run my application and type something in the textbox, i get the following value in the adjacent ones' <html><script> window.location = 'http://localhost/sso/signonServlet? sessionID=7777643267726466939704344537951412a2a';</script></html>