JS Console

From HTML5 Builder
Jump to: navigation, search

JS Console simply gives you access to the client-side environment of your pages, letting you evaluate client-side code expressions and run code.

Configuration

To configure your application to use JS Console, select the main page of your application and follow these steps:

  1. From the Object Inspector, open the Events tab.
  2. Double-click the OnShowHeader event.
  3. On the function for the event, add the following line of code: echo "<script src=\"http://jsconsole.com/remote.js?code\"></script>";. Replace code with a unique code, like 16299E7F-5A88-4EB7-A690-9D688CDE536F.

Your mobile application is now configured to use JS Console. You can deploy your application, and run it on a device (either real or virtual) with access to the internet.

Warning: Undo the changes to your appliaction here when deploying for a public release.

Usage

To access the running page from your workstation, open a web browser and go to jsconsole.com. On the top field, enter :listen code, where code is the code you chose above, and hit Enter.

You can use the console to run any JavaScript expression you want, and get the result on the console, and the effects on the application running on the mobile device.

Help Resources

Documentation

See Also

Personal tools