Skip to content
This repository was archived by the owner on Mar 7, 2018. It is now read-only.

Internal functions

residuum edited this page Sep 14, 2010 · 5 revisions

These methods of the windows.oileide object are usually not called directly, and there are wrapper functions available, see General API documentation.

Note:
Oileide attaches itself to the window object, exposing only the window.oileide object. Method calls are always made via window.oileide.methodName(parameters), although only methodName(parameters) will be listed below.

sail()

Initializes an XMLHttpRequest object or equivalent on older versions of Internet Explorer, where available.

Returns: XMLHttpRequest or null

Mythological reference: Greek heroes sailed to Troy and back, although many did not reach their home again.

callForAchilleus(dataType, url, callbackFunction, isAsynchronous, requestMethod, postData, additionalParams)

Loads data via Ajax and executed callback function for the data

Parameters:

  • dataType: type of data to load via Ajax and hand over to callback function as string, either ‘JSON’, ‘Text’, ‘XML’ or ‘HTML’
  • url: URL to load via Ajax request
  • callBackFunction: name of the function to execute after successful execution of request
  • isAsynchronous: boolean indicating whether to use asynchronous call, defaults to true
  • requestMethod: request method of the call as string, defaults to ‘GET’
  • postData: post data to send for the call as string, defaults to null
  • additionalParams: additional parameters for the callback function

Returns: boolean indicating the success of the request. NOTE: In asynchronous mode, false is only returned, if no XMLHttpRequest could be initialized.

Mythological reference: When Achilleus refused to fight because Agamemnon seized his slave Briseis, the Trojans fought successfully and repelled the Greek to the ships. Achilleus was called for as reinforcement, but did not help. Achilleus’s friend Patroklos then asked him for his armour and fought instead.

getBodyFromHtml(htmlString)

Gets content of <body> tag of HTML as DOM object

Parameters:

  • htmlString: content of HTML file as string to parse

Returns: DOM object with the content of body tag

Clone this wiki locally