dwtest.html is the main HTML and JavaScript page. It has two frames associated with it; a status frame (dwtest_header.html) and the main viewing frame. The viewing frame is initially loaded with dwtest_welcome.html, which is a place-marker for users while the browser starts Java and loads the main Java file (LincApplet.jar).
The FRAMESET tag in dwtest.html is shown below:
<!--set the header frame to 45 pixels at the bottom of the page, with the other frame getting the rest of the space available (1*)-- > <!--FRAMESET ROWS="12%,88%"--> <FRAMESET ROWS="1*, 45" onLoad=start()> <!--the name must remain page_display to allow us to load the different HTML into the correct frame--> <FRAME SRC="dwtest_welcome.html" NAME="page_display"> <FRAME SRC="dwtest_header.html" NAME="hdr" NORESIZE SCROLLING="no" > </FRAMESET>
Once Java has started and LincApplet.jar has been downloaded, the browser begins to run the JavaScript embedded in dwtest.html. It calls the start() function while loading the frames.
In the sample, note that the applet that loads the LincApplet.jar file is started as part of the Dwtest_header.html file. As the header, which contains the status message at the bottom of the screen, is always present while the application is running, the Java applet runs all the time, rather than starting and stopping as new pages are loaded.
During the start() function, a Component Enabler session is established, the login is completed, and a HI command is sent to the system. When the system returns the fireup Ispec in response, the Component Enabler application creates a file name using the fireup Ispec name. For example in the sample, the naming convention is <System Name>_<Ispec Name>.html, which gives a file name of DWTEST_MENU.html.
The fireup Ispec HTML page is then loaded into the main viewing frame. It calls the parent.copyIspecToForm() function to copy the data from the Ispec into the HTML form.
Notes:
The <parent.> prefix on the function call indicates that the function resides in the parent of the page in the main viewing frame, dwtest.html.
The internal name of the FORM in every Ispec HTML page is ispecform. This allows you to refer to the correct objects on the form from the parent.