ALKMaps.loadURL = function( uri, params, caller, onComplete, onFailure )
Background load a document. Deprecated. Use ALKMaps.Request.GET method instead.
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, ALKMaps.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, ALKMaps.nullHandler will be called (which pops up a user friendly error message dialog). |
{<ALKMaps.Request.XMLHttpRequest>} The request object. To abort loading, call request.abort().
Functions | |
emptyFunction | |
getTransport | {Object} Transport mechanism for whichever browser we’re in, or false if none available. |
Properties | |
activeRequestCount | {Integer} |
Deprecated. Use ALKMaps.Request method instead.
Properties | |
_complete | {Boolean} |
Constructor | |
ALKMaps. | |
Functions | |
request | |
onStateChange | |
setRequestHeaders | |
success | {Boolean} - |
getStatus | |
respondToReadyState | |
getHeader | |
dispatchException | If the optional onException function is set, execute it and then dispatch the call to any other listener registered for onException. |
Properties | |
Events | {Array(String)} |
dispatchException: function( exception )
If the optional onException function is set, execute it and then dispatch the call to any other listener registered for onException.
If no optional onException function is set, we suspect that the user may have also not used ALKMaps.Ajax.Responders.register to register a listener for the onException call. To make sure that something gets done with this exception, only dispatch the call if there are listeners.
If you explicitly want to swallow exceptions, set request.options.onException to an empty function (function(){}) or register an empty function with ALKMaps.Ajax.Responders for onException.
exception | {?} |
Properties | |
status | {Integer} |
statusText | {String} |
Constructor | |
ALKMaps. | |
Functions | |
getStatus | |
getStatustext | |
getHeader | |
getResponseHeader | |
getElementsByTagNameNS | |
serializeXMLToString | Wrapper function around XMLSerializer, which doesn’t exist/work in IE/Safari. |
ALKMaps.Ajax.serializeXMLToString = function( xmldom )
Wrapper function around XMLSerializer, which doesn’t exist/work in IE/Safari. We need to come up with a way to serialize in those browser: for now, these browsers will just fail. #535, #536
xmldom {XMLNode} xml dom to serialize
{?}
@param {} request
ALKMaps.nullHandler = function( request )
Background load a document.
ALKMaps.loadURL = function( uri, params, caller, onComplete, onFailure )
Parse XML into a doc structure
ALKMaps.parseXMLString = function( text )
emptyFunction: function ()
{Object} Transport mechanism for whichever browser we’re in, or false if none available.
getTransport: function()
register: function( responderToAdd )
unregister: function( responderToRemove )
dispatch: function( callback, request, transport )
onCreate: function()
onComplete: function()
request: function( url )
onStateChange: function()
setRequestHeaders: function()
{Boolean} -
success: function()
getStatus: function()
respondToReadyState: function( readyState )
getHeader: function( name )
If the optional onException function is set, execute it and then dispatch the call to any other listener registered for onException.
dispatchException: function( exception )
getResponseHeader: function( name )
ALKMaps.Ajax.getElementsByTagNameNS = function( parentnode, nsuri, nsprefix, tagname )
Wrapper function around XMLSerializer, which doesn’t exist/work in IE/Safari.
ALKMaps.Ajax.serializeXMLToString = function( xmldom )
Send an HTTP GET request.
GET: function ( config )