Overview |
The AJAX Framework is a cross browser framework that allows developers to quickly develop web pages that can call web services and server pages through javascript without having to submit the current page. |
|
Examples |
callPage example:
function pageCallback(response){
alert(response);
}
var ajax = new AJAX();
ajax.callPage(“mypage.html”, pageCallback); |
serviceCall example:
function serviceCallback(response){
alert(response);
}
var ajax = new AJAX();
ajax.callService(“MyWebService.asmx”, “MyMethodToCall”, serviceCallback); |
serviceCall with parameters example:
function serviceCallback(response){
alert(response);
}
var ajax = new AJAX();
/* paramters are added to the end of the callService method in key=value pairs. */
ajax.callService(“MyWebService.asmx”, “MyMethodToCall”, serviceCallback, “myParameter1=hello”, “myParameter2=world”); |
serviceCall with custom namespace example:
function serviceCallback(response){
alert(response);
}
var ajax = new AJAX();
/* set new namespace for use with web service. */
ajax.setNameSpace(“http://mynamespaceuri/”);
ajax.callService(“MyWebService.asmx”, “MyMethodToCall”, serviceCallback, “myParameter1=hello”, “myParameter2=world”); |
error handling example:
/* by default the errors are alerted. To suppress this you must redirect them. */
function myErrorHandler(error){
alert(error);
}
var ajax = new AJAX();
ajax.onError = myErrorHandler; |
|
Download |
Download the latest version at http://sourceforge.net/projects/glm-ajax/ |
|
Hi,
Thanks for sharing.
Regards,
Gitesh
http://www.dbametrix.com