Web page location

There are many options available for the location of web pages that are to contain the embedded MapTron 1207 locator application. Figure 2.3a shows possible web page placement.

Web pages may reside in any directory outside the MapTron1207 folder. Web pages may be virtual or in virtual directories. Web pages may also reside inside the MapTron1207 folder. A web page outside the MapTron1207 folder may contain an inline frame housing a page inside the MapTron1207 folder.

Proper referencing of file paths is critical within the HTML code of a web page. The use of relative file paths should be used in the setup. Absolute paths should be avoided.

 
Sample web page
The package file index.htm is a sample web page. This file references other files within the same directory. The index.htm file may be duplicated outside the MapTron1207 folder and edited, or HTML code copied from this file to other web pages.
 
Required code

Figure 2.4a describes the code required in web pages to embed the application. Code may be copied from the sample web page and pasted into the web page's source HTML. The required code is highlighted in blue and green in the figure below.

The document's <head> section references the MapTron1207.js file path relative to the web page, noted in green.

The documents <body> section includes code to embed the application with reference to the MapTron1207.swf application file path relative to the web page, noted in green. This piece of code may be installed anywhere within the <body> section, a <div> layer, or a <table> cell.

Fig 2.4a Required code in web pages
 
Relative file paths

Setting the correct file path is critical. Check file paths for errors should the application not appear in the web browser (this is the most common problem in the setup process). Some web browsers will display problems with file paths.

Keep in mind that its how the browser on the client side resolves file paths that matters. Special attention is required when setting up virtual directories or using CMS systems.

Other example: The web page residing the the other_directory would reference the file MapTron1207.js relative path as "../../MapTron1207/MapTron1207.js"

 
Embedding options
The locator application is embedded in a web page when the web page loads. The size, background color, and border options are specified in the HTML. The following lines of code control these parameters. Setting the border_width to "0" will turn off the border. The border_width, width, and height parameters are specified in pixels. The default size for modules is 500 x 400 pixels.
ary_param['width'] = 500;
ary_param['height'] = 400;
ary_param['bg_color'] = "#FFCC66";
ary_param['border_width'] = 2;
ary_param['border_color'] = "#333333";
Fig 2.4b Sample code - Embed options
All other options are configured via XML. The startup XML file configuration is described in the next section.
 
Web page editors
Use any web page editor that allows one to insert and edit code directly. A plain text editor may also be used. CMS systems must allow direct code editing.
Special note: Web page editors (Dreamweaver, FrontPage, etc.) will not display the embedded 1207 application. Use a web browser to view and test the web page.