This program has been tested to work in Netscape 3.04 and 4.0x. It may work with the new Internet Explorer with the service pack installed (I don't have it to test it), however it failed to work in 3.0 of IE.
Introduction:
Goetz's Menu is a Javascript program that allows you to have images that change when the mouse moves over them. You can use it for a menu, or other uses. For visitors to your site without Netscape 3.0 or higher or an equivalent version of IE, the images will not change, but the links will still operate.
Here is an example of what it can do. Here is the setup file for it.
Creating your menu item:
Create a file, for example items.js, that contains the contents for the menu.
This is the format to be used:
item(link,target,text,image1,image2);
link is the address for the image to be linked to.
target is the target frame, if using frames.
text is the text displayed for people not using images. Also some browsers display the text when the mouse is over the image.
image1 is the first image seen.
image2 is the image seen when the mouse is over the image.
For example
item("http://www.lawrencegoetz.com/","listing","software","soft.jpg","pc.jpg");
If you don't want to use text or frames, set the value to "".
item("http://www.lawrencegoetz.com/","","","soft.jpg","pc.jpg");
Target takes the same value that you'd give the target in regular HTML code. The target is the name of the frame to display the site.
_top will display the site in the main window of the browser (as if
there were no frames).
_blank will display the site in a new browser window.
_self will display the site in the frame that it is in.
name will display the site in the frame specified by name.
Repeat this for each item on your menu. The order you list the items, is the order they are displayed.
The default display for the menu is vertical. You can make it horizontal, by adding the following line in your items file.
direction="h";
Edit make.htm, near the end of the file it has the line:
<script language="Javascript" src="items.js">
</script>
Edit the src value to be the name of your file with your menu items. The default is items.js, but you can change it.
Open up make.htm in your web browser. Then press Generate to have the web page html code appear in the textarea. Now you can highlight and copy the code to your editor, save the code and view the page. If you want to copy parts of the code to an existing page, it lists which parts to copy to your HEAD and BODY tags. You can rearrange the locations of the images, if you wish.
Comment, Questions, Feedback - Send me feedback. I like seeing my script in use. Please send me the URL of the page using the script.
Visit my web site for other things I've made. I've written various children's programs.
Thank you,
Lawrence Goetz