Method Detailvoid 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 reloadDocument() Reloads a ContractPal document contained within a <c:document/> tag. Use this in conjunction with Ajax calls that alter the document server-side. Since: 11-24-08 YUI Panel getPanel() Returns a pointer to the Panel. see c:panel tag. Returns: YUI Panel Since: 11-11-09 void sendPageForm(String action) 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 void scrollToDocumentAnchor(name) Scrolls the HTML ContractPal document to the specified anchor with the given name or element with id of name.
Parameters:
Since: 02-17-09 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-22-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 enableFullAjax(boolean enabled) Enables or disables full AJAX support. Use cautiously.
Parameters:
Since: 06-23-2011 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: 12-03-2009 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 setInterceptHandler(NonTyped function) Registers a function to handle certain server calls. The function should return true or false to allow the call to continue. Pass null to remove it.
Parameters:
Since: 06-23-2016 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); } void getDocumentQueryString() If an html-based ContractPal document is visible, this method bundles the form input parameters as a querystring usable for ajax posts. Since: 02-03-2010 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 scrollToDocumentSignature() Scrolls the HTML ContractPal document to the signature to be signed. Since: 02-17-09 Form Object getPageForm() Returns the page form object. Returns: Form Object Since: 09-27-08 void resizeDocument() Resizes the ContractPal document frame to eliminate scrolling. Since: 02-17-09 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 launchAttachmentEditor(String attachmentId) Launches the appropriate desktop editor for the given attachment.
Parameters:
Since: 09-16-09 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 int getAdHocPageCount() Returns the number of pages in the ad-hoc document. Returns: int Since: 11-09-09 void showAdHocPage(String id,int page) Displays the specified page of the ad-hoc document.
Parameters:
Since: 11-09-09 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 - 2024, ContractPal, Inc. All rights reserved. | API Date: Dec 30, 2024 11:45 AM |