View Full Version : HV menus and images (rollovers)

09-27-2004, 07:48 PM
I am using the HV Menu script ...

HV Menu Script (http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm)

I am trying to use the rollover function designated in the script. It's got a nifty feature that let's you replace the "text" in a menu with an image, and a rollover image (ie, as in buttons). I need this to accomodate my design, which is why I selected the script!

Well, I got the rollover feature to work, by following the sample:

Menu1=new Array("rollover:Image1.jpg:Image2.jpg","/book/query.html","",0,48,211);

This works *peachy* as long as the pages, images and the js are all in the same directory. However, as soon as I move the images into their respective graphics directory, or I move a page into a subdirectory, the images all break.

I've tried referencing the graphics directory in the code, but it doesnt seem to work; for example:

Menu1=new Array("rollover:'/images/Image1.jpg':'/images/Image2.jpg'","/book/query.html","",0,48,211);

... but this does not work :(

Any ideas? I'd really like to incorporate this feature, but the site I am working on is huge, and we must organize pages, images, etc, into subdirectories.

Any help, would be greatly appreciated :confused:

09-27-2004, 09:46 PM
remove the / and '

Menu1=new Array("rollover:images/Image1.jpg:images/Image2.jpg","book/query.html","",0,48,211);

09-28-2004, 11:58 AM
well, I can remove the ' , but i need the first / in the code... the menu is inside of a template, that is referenced on many pages (some at the root of the main directory, some in subdirectories, etc), so the reference to the image has to be absolute to the root. any ideas on how to do this in this case?

09-28-2004, 10:41 PM
Oooppsss... Sorry, I suggested to remove the first / because it didn't work in My computer.. Of course it didn't work... I ran the script in a subdirectory... Silly me :p

Well if You keep the / and it works out fine, then keep it :)

05-25-2008, 11:21 PM
I followed the discussion above but, even with all files in the same folder, I couldn't get the rollover to work at all in v5.5.

Is it broken, or have I missed a crucial variable setting somewhere?