IE5.5/Mozilla Shadow not appearing

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
fulmer
Super Advanced
Super Advanced
Posts: 39
Joined: Mon Dec 08, 2003 9:00 am
Location: Hachioji, Japan
Contact:

IE5.5/Mozilla Shadow not appearing

Post by fulmer »

I can get the shadow to appear in IE6, but no other browser allows the shadow to show up. I know they are only supposed to work with IE5.5 or greater... but it doesn't even show up in IE5.5...
What is wrong?
(sorry, my link is behind a firewall, no external access)

Here's part of the script...

with(style1=new mm_style()){
align="center";
onbgcolor="#366999";
offbgcolor="#EFEFEF";
oncolor="white";
offcolor="#003063";
bordercolor="#366999";
borderstyle="solid";
borderwidth=1;
separatorcolor="#366999";
separatorsize="1";
high3dcolor="#003063";
low3dcolor="#003063";
swap3d=1
padding=3;
fontsize=10;
fontstyle="normal";
fontweight="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="#003063";
pagebgcolor="white";
headercolor="#003063";
headerbgcolor="white";
subimage="/path/to/arrow.gif";
subimagepadding="1";
separatorsize=1;
overfilter="Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
}

with(milonic=new menuname("mainmenu1")){
top=185;
left=1;
style=style1;
alwaysvisible=1;
itemwidth=128;
aI("text=Title 1;onbgcolor=#003063;oncolor=white;offbgcolor=#003063;offcolor=white;padding=1;fontsize=12;status=Title1")
aI("text=menu1;showmenu=popup1;status=menu1")
aI("text=menu2;showmenu=popup2;status=menu2")
aI("text=menu3;showmenu=popup3;status=menu3")
}
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

fulmer wrote:...I know they are only supposed to work with IE5.5 or greater... but it doesn't even show up in IE5.5...
I think the problem is that ie5.5 chokes when you define multiple effects in one filter; it can only handle one effect at a time. So, if you want to have a drop shadow in your overfilter, you'll have to remove your Alpha() effect, leaving only the Shadow() effect. If you want the combined effect in ie6, but the shadow only in ie5.5, then define the overfilter in a conditional, like so:

Code: Select all

if (ie55 && navigator.userAgent.indexOf("MSIE 6") != -1) {
  overfilter="Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)"; 
}
else {
  overfilter="Shadow(color='#777777', Direction=135, Strength=5)";
}
Hope that helps,

Kevin
fulmer
Super Advanced
Super Advanced
Posts: 39
Joined: Mon Dec 08, 2003 9:00 am
Location: Hachioji, Japan
Contact:

Post by fulmer »

Thanks Keven, but I'm not sure how to write a conditional expression in the js file... I'm a newbe... clueless... sorry!

would it be something like this?

overfilter={
if (ie55 && navigator.userAgent.indexOf("MSIE 6") != -1) {
overfilter="Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
}
else {
overfilter="Shadow(color='#777777', Direction=135, Strength=5)";
}}
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Thanks Keven, but I'm not sure how to write a conditional expression in the js file...would it be something like this?
Hi Fulmer,

You're welcome. Actually, the conditional code would appear exactly as I wrote it ;) So I guess the question would be... where do you put it? Sorry I left that part out. You'd put the code in the menu style in place of a simple assignment (replaces overfilter="yadah yadah yadah;"). Using your own style, from the example you gave earlier, the conditional would go like so:

Code: Select all

with(style1=new mm_style()){ 
align="center"; 
onbgcolor="#366999"; 
offbgcolor="#EFEFEF"; 
oncolor="white"; 
offcolor="#003063"; 
bordercolor="#366999"; 
borderstyle="solid"; 
borderwidth=1; 
separatorcolor="#366999"; 
separatorsize="1"; 
high3dcolor="#003063"; 
low3dcolor="#003063"; 
swap3d=1 
padding=3; 
fontsize=10; 
fontstyle="normal"; 
fontweight="normal"; 
fontfamily="Verdana, Tahoma, Arial"; 
pagecolor="#003063"; 
pagebgcolor="white"; 
headercolor="#003063"; 
headerbgcolor="white"; 
subimage="/path/to/arrow.gif"; 
subimagepadding="1"; 
separatorsize=1;
if (ie55 && navigator.userAgent.indexOf("MSIE 6") != -1) { 
    overfilter="Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)"; 
  } 
else { 
    overfilter="Shadow(color='#777777', Direction=135, Strength=5)"; 
  }
}
If you want, you can copy that code from the green code block above and paste it into your menu_data.js file, replacing your current style.

Hope that helps,

Kevin
Post Reply