Demo: Fitted Window Opening From AXEL Stream File

(c) Jane Veeder, 2004 (with Javascript help borrowed from Blank Media, www.blank.no/axel)

Definition: A "function" is a named bit of code that describes various actions to be taken to accomplish a task. The task is executed when the function is "called" by name.

1. Open the demo html file, fitwindow.html, in Dreamweaver, go to CODE view, and note the functions included, where they are in the html page code (note that they precede the AXEL stream content and are not in the body of the page - that is important). These are the functions that can be called from within the AXEL stream file.

2. Each of these functions opens a new window, specifies its size and other characteristics. Note that the contents of that window can be a local html page file or a URL to open a remote site page.

3. An easy way to test your window opening functions in the web page alone is to open it in IE, then type into the URL address field at the top of the page: "javascript: functionName()" (substitute your actual function name for functionName)

4. In the main or hub AXEL authoring file (the one from which the user will open other html windows), create sensors attached to objects. These will be used to trigger the opening of new browser windows.

5. Create "Call Javascript" reactions to attach to these sensors. Interact > Add Reaction > Call JavaScript...

6. In the blank field included in the reaction, type the name of a function* residing in the main html file. One example from the demo is "subwindow1();"

7. In Publish Settings > AXEL Stream, be sure to either UNcheck "generate web page file" or set the name of the published web page file to something different than the one you are going to use for the final wrapper, because you don't want AXEL to be destroying the custom Javascript coding you will be adding to the html page that embeds this main or hub AXEL stream file.

8. Once the functions operate on their own from the URL address line and you have the Call JavaScript reactions working in the AXEL preview, you can embed the AXEL stream file into the hub html Web page file by simply copy-and-pasting from the default published Web page into the hub Web page (cutting and pasting like this is also the method for placing AXEL stream file windows into html tables.