Method Detailvoid getChannel() Returns the channel (function) for an inline pal to communicate with the parent pal on the client. Since: 07-23-2019 void getGeoLocation(NonTyped successFunction,NonTyped failFunction) Calls the specified function(s) passing the result of navigator.geolocation HTML5 API. This is asynchronous.
Parameters:
Since: 12-14-2016 void openTransaction(String encryptedId) Opens Navigator with the specified transaction. The ID must be passed encrypted to this method.
Parameters:
Since: 01-19-2010 void sendPageForm(String action,String params) Submits the page to the server.
Parameters:
Since: 11-20-09 int getDocumentWidth() Returns width of the DOM document. Returns: int Since: 11-07-08 int getHorizontalScroll() Returns the position of the horizontal scrollbar. Returns: int Since: 11-07-08 String getPageFormName() Returns the name of the page form. Returns: String Since: 09-27-08 void launchFileEditor(String fileId) Launches the appropriate desktop editor for the given file.
Parameters:
Since: 10-25-2010 int getVerticalScroll() Returns the position of the vertical scrollbar. Returns: int Since: 11-07-08 void loadResource(String id, String resource, String source, String version) Loads the specified resource into the page if it does not already exist
Parameters:
Since: 06-20-2019 Sample: // load current version of bootstrap-min.css from platform
ClientPal.loadResource("bs","bootstrap-min.css","bootstrap");
// load specified version of bootstrap-min.css from platform
ClientPal.loadResource("bs","bootstrap-min.css","bootstrap","3.3.7");
// load bootstrap-min.css from the pal
ClientPal.loadResource("bs","bootstrap-min.css");
//load myStuff.js, a custom script, from the pal
ClientPal.loadResource("myStuff","myStuff.js");
ClientPal.delayExec("showSomethingThatDependsOnResourceLoaded()");
void sendRemoteAjaxRequest(String url, String handler, NonTyped params) Posts an ajax request to a remote server. url and handler are required. params can be a querystring, a form object, or nothing (don's pass a param). The success of this call depends on the browser and its security settings. Your handler will receive three arguments: text of response, content type, and http status code.
Parameters:
Since: 04-15-2017 Sample: // Note- as of 12/3/2009 this feature only works with IE in the trusted sites zone with low security
// Future support might include Firefox 3.5 and other browsers supporting resource sharing
// See "http://www.w3.org/TR/access-control/
// client-side javascript
function sendAjax()
{
ClientPal.sendRemoteAjaxRequest("https://yoursite.com/yourhandler.php","resultHandler",ClientPal.getPageForm());
}
function resultHandler(result,contentType,statusCode)
{
if (result!=null)
{
// or var obj = JSON.parse(result);
document.getElementById("result").innerHTML=html;
}
}
void enableFullAjax(boolean enabled) Enables or disables full AJAX support. Use cautiously.
Parameters:
Since: 06-23-2011 Window openWindow(String url, String name, String params) Creates, opens, and returns a handle to a window.
Parameters:
Returns: Window Since: 11-07-08 Sample: function openThisWindow()
{
var url = "http://www.someothersite.com";
var name="myWIndow";
var params="toolbar=yes,width=300,height=300,resizable=yes,scrollbars=yes,location=yes,status=yes,directories=yes,menubar=yes,copyhistory=no";
var win = ClientPal.openWindow(url,name,params);
}
Form Object getPageForm() Returns the page form object. Returns: Form Object Since: 09-27-08 int getViewportHeight() Return the height of the browser viewport area. Returns: int Since: 11-07-08 int getViewportWidth() Return the width of the browser viewport area. Returns: int Since: 11-07-08 void delayExec(String scriptToExecute) Runs the specified script after the library is loaded. See loadResource.
Parameters:
Since: 06-20-2019 Sample: // load current version of bootstrap-min.css from platform
ClientPal.loadResource("bs","bootstrap-min.css","bootstrap");
// load specified version of bootstrap-min.css from platform
ClientPal.loadResource("bs","bootstrap-min.css","bootstrap","3.3.7");
// load bootstrap-min.css from the pal
ClientPal.loadResource("bs","bootstrap-min.css");
//load myStuff.js, a custom script, from the pal
ClientPal.loadResource("myStuff","myStuff.js");
ClientPal.delayExec("showSomethingThatDependsOnResourceLoaded()");
int getDocumentHeight() Returns height of the DOM document. Returns: int Since: 11-07-08 void runJavascript(String js) Executes the given javascript. Use this in place of eval.
Parameters:
Since: 09-27-08 Sample: var x = 3;
ClientPal.runJavascript("a=x*9");
void registerAjaxErrorHandler(NonTyped handler) Registers a function to handle server error messages generated during ajax calls.
Parameters:
Since: 05-23-2012 void sendAjaxRequest(String action, NonTyped handler, NonTyped params, NonTyped json, String workflow) Posts an ajax request. action and handler are required. handler can be a function name (string) or an actual function. params can be a querystring, a form object, or nothing (don's pass a param).
Parameters:
Since: 09-27-08 Sample: // client-side javascript
function sendAjax()
{
ClientPal.sendAjaxRequest("saveThis","resultHandler",ClientPal.getPageForm());
// alternately ClientPal.sendAjaxRequest("saveThis","resultHandler","choice=1&item=2");
}
function resultHandler(html,js)
{
if (html!=null)
{
document.getElementById("result").innerHTML=html;
}
if (js!=null)
{
ClientPal.runJavascript(js);
}
}
// server-side workflow
if (c.isAction("saveThis"))
{
var frag = c.createFragment("frag","<p>OK</p>",false);
var response = c.createAjaxResponse(frag,false);
response.addJavascript("alert('we saved your info')");
return response;
}
int getWindowX() Return the X position of the window on the screen. Returns: int Since: 11-07-08 int getWindowY() Return the Y position of the window on the screen. Returns: int Since: 11-07-08 |
|||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright © 2006 - 2025, ContractPal, Inc. All rights reserved. | API Date: Oct 22, 2025 03:32 PM |