Showing posts from January, 2010

Ajax with Jquery

Following is simple example code can be use to send the ajax requests using JQuery. Sending Ajax request with JQuery is much more easier than can apply more user friendly messages to user $.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", success: function(msg){ alert( "Data Saved: " + msg ); } }); Note : In IE browsers it convert and process the XML response string as Text prevent that can use as following $.ajax({ url: "data.xml", dataType: ($.browser.msie) ? "text" : "xml", success: function(data){ var xml; if (typeof data == "string") { xml = new ActiveXObject("Microsoft.XMLDOM"); xml.async = false; xml.loadXML(data); } else { xml = data; } // Returned data available in object "xml" } There are much more options