Can you explain this code to me and also any links for further study...
On Oct 9, 3:35 pm, "Jeffrey Kretz" <jeffkr...@hotmail.com> wrote: > This would be one way of doing that with jQuery: > > $.ajax({ > url:"https://ondemand.abc.com/xyz/sessionServlet", > success:function(results){$("#time").val(results);} > > > > }); > -----Original Message----- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of Nits > Sent: Friday, October 09, 2009 12:56 PM > To: jQuery (English) > Subject: [jQuery] XMLHttpRequest in jQuery > > 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>- Hide > quoted text - > > - Show quoted text -