|
|
ajax get method - AJAX
|
Views : 318
|
|
Tagged in : AJAX
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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 |
|
|
|