ajaxRequest

Single line function AJAX callback routine that allows you to send a request to a server Url and retrieve the raw string result to a specified callback handler.

Note: Ajax requests are not cross-domain unless enabled by the browser so this should be used only against same server requests. If you need Cross Domain Ajax Calls look into the jsonp function although this function requires server participation.

ajaxRequest(url,post,callback,errorCallback)

Parameters

url
The URL to access including any query string data.

post
optional POST data or null. You can also pass FormData to pass all the page form content excluding ASP.NET's viewstate.

callback
Optional function that is called on a successful callback. Function receives raw HTTP result string as a parameter.

errorCallback
Optional function that is called when an error occurs. Receives a CallbackException object as a parameter that holds exception information.

See also:

Class global


  Last Updated: 1/8/2008 | © West Wind Technologies, 2008