Back Forward CDK Home Reference Samples Resources
SourceLoader

 Building the SourceLoader Component

The SourceLoader Crossware component makes use of JavaScript to Java calls, and essentially acts to encapsulate Java functionality for retrieving an URL from a server.


There is a Visual JavaScript PR3 Project File ( (install dir)/samples/SourceLoader/SourceLoader.prj) which can be opened in Visual JavaScript PR3. One can learn how to use the SourceLoader component by inspecting the components on the page once the project is opened, and looking at how the page has been wired together.

Deploy this project (which contains sample Crossware Application pages using the SourceLoader component) to a server and load Page1.html to see a basic demonstration of the SourceLoader at work. (The files can also be copied directly to a server without using Visual JavaScript).

Page2.html illustrates using the SourceLoader in conjunction with some custom Client-side JavaScript to build a Crossware Application that loads the URL specified (it must be from the same server due to security restrictions) into a new window, with the following changes:



( return to the top of the page )