ajax get method - AJAX Views : 318
Tagged in : AJAX
0 0
Send mail
ajax get method:

Use ajax get method to submit the values without reloading the page.

var browser = navigator.appName;
function createRequestObject()
{
var request_o; //declare the variable to hold the object.
if(browser == "Microsoft Internet Explorer")
{
/* Create the object using MSIE's method */
request_o = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
/* Create the object using other browser's method */
request_o = new XMLHttpRequest();
}
return request_o; //return the object
}
function ajaxa(param)
{
var str = "test.php?strng="+param;
httpa = createRequestObject();
httpa.open('get', str,true);

httpa.onreadystatechange = handleResponse;
/* Send the data. We use something other than null when we are sending using the POST
method. */
httpa.send(null); // Null for Get Method
}
By Ramya, On - 2010-01-30



    Login to add Comments .