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
bgimage for all graphic men not working - SOLVED
Poster: wpatters1229
Dated: Tuesday June 20 2006 - 21:17:22 BST
I have the following menu and have created two images for each menu item. That works great but I wanted to have a background image appear behind the menu item that corresponds to the page they are on. This works great with text menus and pagecolor. I created a graphic that has a height 4 pixels taller than the menu graphics. I figured it would show up behind the menu item graphic and just show the bottom 2 pixel line that is on the image call pagebg.gif .
Nothing seems to work. Please take a look.
if(navigator.appVersion.indexOf("MSIE 6.0")>0)
{
effect="Fade(duration=0.0);Alpha(style=0,opacity=98);Shadow(color='#777777', Direction=135, Strength=5)"
}
else
{
effect="Shadow(color='#777777', Direction=135, Strength=5)"
}
_menuCloseDelay=500;
_menuOpenDelay=150;
_scrollAmount=3;
_scrollDelay=20;
_followSpeed=5;
_followRate=40;
_subOffsetTop=1;
_subOffsetLeft=10;
with(style1=new mm_style()){
overbgimage="";
onbgimage="";
offcolor="red";
offbgcolor="";
oncolor="blue";
onbgcolor="";
bordercolor="#cbb4c4";
borderstyle="solid";
borderwidth=0;
separatorsize="0";
separatorcolor="blue";
fontsize=12;
fontstyle="normal";
fontweight="BOLD";
fontfamily="Square 721 BT,Arial";
pagecolor="blue";
pagebgcolor="";
pagebgimage="/pagebg.gif"
effect="Fade(duration=0.0);Alpha(style=0,opacity=98);Shadow(color='#777777', Direction=135, Strength=5)"
padding=0;
}
with(milonic=new menuname("mainmenu")){
orientation=1;
top=82;
menuwidth=960;
screenposition="center";
style=style1;
alwaysvisible=1;
followscroll=0;
aI("image=../../../menu/tech_ref_b1.gif;overimage=../../../menu/tech_refblue_b1_over.gif;url=http://www.prtassoc.com/test/index.asp;status=Home page")
aI("image=../../../menu/tech_ref_b2.gif;overimage=../../../menu/tech_refblue_b2_over.gif;url=http://www.prtassoc.com/test/president.asp;tooltip=Our Coporate Message;tipfollow=1;status=Presidents Message")
aI("image=../../../menu/tech_ref_b3.gif;overimage=../../../menu/tech_refblue_b3_over.gif;url=http://www.prtassoc.com/test/organization.asp;status=Our Organization")
aI("image=../../../menu/tech_ref_b4.gif;overimage=../../../menu/tech_refblue_b4_over.gif;url=http://www.prtassoc.com/test/services.asp;status=Our Services")
aI("image=../../../menu/tech_ref_b5.gif;overimage=../../../menu/tech_refblue_b5_over.gif;tooltip=Associates List;tipfollow=1;align=center;url=http://www.prtassoc.com/test/associates.asp;status=Associates List")
aI("image=../../../menu/tech_ref_b6.gif;overimage=../../../menu/tech_refblue_b6_over.gif;tooltip=Useful Automotive Links;tipfollow=1;url=http://www.prtassoc.com/test/library/links.asp;status=Useful Automotive Links")
aI("image=../../../menu/tech_ref_b7.gif;overimage=../../../menu/tech_refblue_b7_over.gif;tooltip=Articles of Interest;tipfollow=1;url=http://www.prtassoc.com/test/librarydefault.asp;status=Articles of Interest")
aI("image=../../../menu/tech_ref_b8.gif;overimage=../../../menu/tech_refblue_b8_over.gif;tooltip=Join Our Team;tipfollow=1;url=http://www.prtassoc.com/test/employment.asp;status=Employment")
aI("image=../../../menu/tech_ref_b9.gif;overimage=../../../menu/tech_refblue_b9_over.gif;url=http://www.prtassoc.com/test/contact.asp;tooltip=Assignment Forms;tipfollow=1;status=Assignment Forms")
aI("image=../../../menu/tech_ref_b10.gif;overimage=../../../menu/tech_refblue_b10_over.gif;tooltip=Proprietary - By Subscription Only;tipfollow=1;align=center;url=http://www.prtassoc.com/test/tech/default.asp;status=Technical Reference Section")
}
drawMenus();
Poster: Ruth
Dated: Tuesday June 20 2006 - 21:30:14 BST
Hiya,
Without a url, all I can suggest is you check the path. Maybe remove the beginning / and see if that does it.
Ruth
pageimage reply
Poster: wpatters1229
Dated: Tuesday June 20 2006 - 22:11:53 BST
here is the url http://www.prtassoc.com/test
I tried changing the path and it still doesn't work. The menus are called from a header include file. Everything else works. The bottom menu is in a bottom include file that has the menus code inserted in a table. I have left it alone as text until I can figure this out and the site owner approves of all of this. I had to switch to graphics for the menus because the client likes a font Square 721 BT that is not normally found on browsers. The default after that is Arial...you can see the difference in the capital R. I just want to highlight or underline the menu item for the page they are on. As you can see it works for text.
Thanks
Poster: Ruth
Dated: Wednesday June 21 2006 - 0:40:59 BST
Hi,
The path is incorrect. That image is at
Code:
http://www.prtassoc.com/menu/pagebg.gif
and the page is atCode:
http://www.prtassoc.com/test/
so if you put in /pagebg.gif it is looking for it outside the menu/ folder. [I think. I should change my name to 'path illiterate'!
Ruth
bgimage
Poster: wpatters1229
Dated: Wednesday June 21 2006 - 1:31:46 BST
I tried setting the path to fully qualified http://www.pertassoc.com/menu/pagebg.gif and it still did not show up. If you look at the pathing I have for the menu images they are at ../../../menu/tech_ref_b1.gif and they work. I had to go that far out in the path statement because the menus are at diferent levels depending on which subfolder the header is at. There is a common menu with header include files under different folders. I want to put all the html and asp files in a singel folder called HTML and images in another etc. but the original web designer wrote some code for tracking logs and building reports that the client doesn't want to disturb.
Anyhow none of these things work.
more on pagebg image
Poster: wpatters1229
Dated: Wednesday June 21 2006 - 1:44:44 BST
I used the ../../../menu/pagebg.gif in one of the menu items as the overimage and it worked fine. The pathing works. I also placed it in the overbgimage and it worked and worked at onbgimage. But not for pagebgimage
Poster: Ruth
Dated: Wednesday June 21 2006 - 2:20:33 BST
Hi,
Isn't the url prtassoc not pertassoc? When I use the one I put in the code above, I see the image. If I use yours I get a page not found.
http://www.prtassoc.com/menu/pagebg.gif
If you click that you get a page with the image.
Ruth
finger check
Poster: wpatters1229
Dated: Wednesday June 21 2006 - 3:22:03 BST
yes it is prtassoc but seeing the image is fine it is just not showing up when you place it in the menu style as pagebgimage=
It is as if the jscript is messed up.
Poster: Ruth
Dated: Wednesday June 21 2006 - 5:45:59 BST
Hi,
I found two problems. One: on that test page there is no pagebgimage listed, it is pagebgimage=""; The second, and more difficult is that I could not get the pagebgimage to show using the PNGs you have for the image and overimage. When I converted them to transparent gifs then the pagebgimage showed fine.
So, list that pagebgimage with the correct path and convert the PNGs to transparent gifs, and I would also change the off/on bgcolors from ="" to ="transparent";
Finally, you need to upgrade, you're down 4 levels and there have been some fixes, we are now at 5.751.
Ruth
bg problems
Poster: wpatters1229
Dated: Wednesday June 21 2006 - 18:38:24 BST
I had to change the graphics for the menus to png to get a better looking graphic. The client thought my other graphics where fuzzy. I will try what you did with the transparent gif. Here is my theory on the pagebgimage;
If the image is larger in height and as you have seen I have a blue 2 pixel line along the bottom, wouldn't the pagebgimage show up behind the other graphics since the bottom would be sticking out? Is the bg image relationship to the other images in a default top or bottom? How do all those layers relate?
Poster: Ruth
Dated: Thursday June 22 2006 - 3:19:21 BST
Hiya,
I got it. ::whew::
Broken down it comes to this. Your item images are 15px high and your pagebgimage is 23px high. That would sound logical, that means the bgimage will be higher than the item image so it should show the line at the bottom, right? No. Because the item image is 15px the menu item height automatically is 15px, plus any padding. So the blue line you have is much lower down than 15px and doesn't show. Go to the menu and put in itemheight=23; up where you have followscroll=0 etc.
Ruth
bgimage not working - SOLVED
Poster: Ruth
Dated: Thursday June 22 2006 - 23:05:01 BST
Hi,
I wasn't sure if you got the notice of the last post.
Ruth