Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:03
offbgcolor will not work without text in image menu in IE
Poster: grataballi
Dated: Monday November 22 2004 - 9:09:10 GMT
I've read through all of the forum relating to the on and offbgcolor, and have not been able to find a cure for this....
I'm trying out the image rollover/swap menu, and have created simple on and off images - they work fine. In the sample menu, there is text next to the images - once I removed the text (and utilized images only), the bgcolor "sticks" to the "onbgcolor" around the "arrow.gif" in IE, however, it works fine in Mozilla/Firefox 1.0.
I read that for one user, worked fine once uploaded to a server - I've done that on a sample site, and it still didn't have an effect, (acts the same on the server as it does locally).
Here's the URL: http://www.finehomebuilders.us/menu/menu1/menu.htm
(remember, it's OK in Firefox, doesn't work in IE)
If you refresh the page, it shows the intended bgcolor (IE only)....once you mouseover, you're stuck again with the onbgcolor.
I've tried entering individual "onbgcolor" and "offbgcolor" values in the menu items individually, no luck their either.
Poster: John
Dated: Monday November 22 2004 - 16:21:11 GMT
My J.O.B. is getting in the way of my spending more than 5 minutes on this right now.
However, in this instance I don't see why you want to use images. The menu will do what you want by itself. See http://www.west.asu.edu/sa/testsite/test.htm, and http://www.west.asu.edu/sa/testsite/menu_data.js for changes made to the _data file.
Poster: grataballi
Dated: Monday November 22 2004 - 17:04:21 GMT
Thanks for taking a look. I tried your version in Mozilla and it works fine - still doesn't work in IE.
Here's my code in the section that you altered:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
left=100;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("text=ok with text;showmenu=Home;image=home.gif;overimage=home_on.gif;onbgcolor=#ff6633;offbgcolor=#CCCCCC;");
aI("showmenu=Milonic;image=home.gif;overimage=home_on.gif;onbgcolor=#ff6633;offbgcolor=#CCCCCC;");
aI("showmenu=Partners;image=home.gif;overimage=home_on.gif;onbgcolor=#ff6633;offbgcolor=#CCCCCC;");
aI("showmenu=Links;image=home.gif;overimage=home_on.gif;onbgcolor=#ff6633;offbgcolor=#CCCCCC;");
}
Here's yours:
sub1Style = new copyOf(menuStyle)
sub1Style.offcolor="#515151";
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
left=100;
alwaysvisible=1;
orientation="horizontal";
//position="relative";
aI("text=Home;showmenu=Home;");
aI("showmenu=Milonic;image=http://www.finehomebuilders.us/menu/menu1/home.gif;overimage=http://www.finehomebuilders.us/menu/menu1/home_on.gif;");
aI("showmenu=Partners;image=http://www.finehomebuilders.us/menu/menu1/home.gif;overimage=http://www.finehomebuilders.us/menu/menu1/home_on.gif;");
aI("showmenu=Links;image=http://www.finehomebuilders.us/menu/menu1/home.gif;overimage=http://www.finehomebuilders.us/menu/menu1/home_on.gif;");
}
I notice the new subStyle, other than that I think we're on the same page. (I did try adding style to each menu item, but that didn't work either)
Did you test the altered version with IE? For me, it's still sticking with the "onbgcolor".
Poster: John
Dated: Monday November 22 2004 - 17:39:58 GMT
Yes, tested in XP Pro/IE6. No problems at all.
Note that the only menu I had time to change was the first one (and there are a few changes in menuStyle as well). The others are still the "old way".
Poster: grataballi
Dated: Monday November 22 2004 - 18:35:44 GMT
I'm still not getting the correct view in IE. I've taken a small screenshot - it's driving me nuts (why does it work for your system, but not mine - I have XP Pro, IE 6 as well)
Is there a way to send over the screenshot so you can see what I'm looking at?
Poster: John
Dated: Monday November 22 2004 - 18:41:06 GMT
Post it to your server and then use the [img]http://blah.blah...[/img] tags here.
Poster: grataballi
Dated: Monday November 22 2004 - 20:01:40 GMT
here it is:
http://www.finehomebuilders.us/menu/clip_image002.jpg
(screen shot after I mouse-over'd the images, showing the stuck background color)
g
(thanks for your time!)
Poster: John
Dated: Monday November 22 2004 - 20:17:12 GMT
As mentioned above, the only menu I changed was the first one, which is displaying properly in your screen shot. I did not touch the other three, and they're still showing incorrectly, as expected.
Make the same changes I made to the first menu item.
Poster: grataballi
Dated: Monday November 22 2004 - 22:50:09 GMT
Hi John - again, your expertise is appreciated -
The first menu item is working, however, it's only text, not an image. There are no images displaying currently in the first menu item. I'm trying to get the on/off images to work correctly.
Your code is as follows:
aI("text=Home;showmenu=Home;");
it doesn't give me the rollover/image effect I'm looking for. The home and home_on gif's are just for simplicity and experimental sake - I wanted to do something a bit more clever....
g