View Full Version : script help

11-22-2003, 07:35 AM
Hi there

The last 2 lines in this script i need to be able to loacat an image

function addMenuItem(label, action, image, mouseover) {
this.items[this.items.length] = label;
this.actions[this.actions.length] = action;
this.image[this.src] = image;
this.mouseover[this.onmouseover] = mouseover;

this.image i need to be able to loacate an image that will load automaticly and this.mouseover i need the image to change on mouseover.

this is the last thing i need on my nav bar and have been working for ages on it and just cant seam to figure it out.

any help will be great


11-23-2003, 09:16 PM
if you are trying to dynamically replace an image, here is how to do it....

<script language="JavaScript">
window.document.images[555].src = "http://www.mysite.com/images/yo.gif";

you need to replace 555 with the number the image in question appears in the html code.