CAPH.CORE

Methods

getElement

Description

Return DOM Elements.

Parameters

■selector - String - the selector that you want to find. When the prefix is "#", finds element by id. When the prefix is ".", finds element by class name. When the prefix is not exist, finds element by name. ■root (Optional) - DocumentElement - Start to find element from 'root' element which is passed by parameter. If it is not provided, find element from 'document' element.

ajax

Description

Perform an asynchronous HTTP (Ajax) request.

Parameters

■url - String - The URL to which the request is sent.■option - Object - A set of key/value pairs that configure the Ajax request. * method : (String) The type of request to make ("POST" or "GET") - [default : "GET"] * async : (Boolean) By default, all requests are sent asynchronously. If you need synchronous requests, set this option to false. - [default : true] * parameter : (String) Data to be sent to the server. It is converted to a query string, if not already a string. K1347Object must be Key/Value pairs. * type : (String) The type of data that you're expecting back from the server. - value : XML, HTML, TEXT, JSON, JSONP - [default : "XML"] * header : (Array) additional header key/value pair objects to send along with requests using the XMLHttpRequest transport. * cbHandler : (Function) to be called when the request finishes. The function gets passed one or more arguments. The Response object and cbParameter array. * cbParameter : (Array) which is passed to cbHandler function. * jsonpCharset : Only applies when the "JSONP" type is used. Sets the charset attribute on the script tag used in the request. * jsonpCallback : Override the callback function name in a jsonp request. This value will be used instead of '_callback' in the '_callback=' part of the query string in the url.