OpenLayers.loadURL = function( | uri, | | params, | | caller, | | onComplete, | | onFailure | ) |
|
Background load a document. For more flexibility in using XMLHttpRequest, see the OpenLayers.Request methods.
Parameters
uri | {String} URI of source doc |
params | {String} or {Object} GET params. Either a string in the form “?hello=world&foo=bar” (do not forget the leading question mark) or an object in the form {‘hello’: ‘world’, ‘foo’: ‘bar} |
caller | {Object} object which gets callbacks |
onComplete | {Function} Optional callback for success. The callback will be called with this set to caller and will receive the request object as an argument. Note that if you do not specify an onComplete function, <OpenLayers.nullHandler> will be called (which pops up a user friendly error message dialog). |
onFailure | {Function} Optional callback for failure. In the event of a failure, the callback will be called with this set to caller and will receive the request object as an argument. Note that if you do not specify an onComplete function, <OpenLayers.nullHandler> will be called (which pops up a user friendly error message dialog). |
Returns
{OpenLayers.Request.XMLHttpRequest} The request object. To abort loading, call request.abort().