OpenWGA 7.6 - JavaScript reference
WGA.ajaxMethod :
WGA.ajax.action(params)
On object | WGA.ajax |
Usage |
Calls a WebTML AJAX action from JavaScript |
Description |
This function takes a JavaScript object "params" containing several parameters about the called action. The action link generated by <tml:action ref="actionid"> determines the action to be called and the WebTML action parameters of the call. It must also be generated with AJAX enabled, using the ajax attribute. Optionally the call can also be provided with URL parameters in the "params" property, which have the advantage over action parameters to be determinable on the client side by the JavaScript itself. All values on this params object will get converted to strings when they are converted to URL parameters. The WebTML action code can retrieve these parameters using method this.request.getParameter(paramName). |
Parameters |
params (JavaScript object): An object containing parameters as properties. Valid properties are:
|
Examples |
Calling a simple AJAX action. Note the embracing string delimiters around <tml:action>, so the returned action link generated by that tag is given as string to the function: WGA.ajax.action({ action: "<tml:action ref="$store" ajax="true"/>", graydiv: true }); |