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:53
IE Special comments
Poster: drumbo
Dated: Friday September 29 2006 - 15:21:17 BST
Hi,
I am using an ASP script to generate my menu_data file and I am using a special comment from MS (that IE detects and acts on) in the script, however by using this comment - the menu breaks (i.e I get javascript errors)
The code:
Code:
with(HeadersStyle=new mm_style()){
<!--[if !IE]>
bordercolor="#66CCFF";
borderstyle="solid";
borderwidth=1;
<![endif]-->
headerbgcolor="#E3E9F4";
<!--[if !IE]>
bordercolor="#66CCFF";
borderstyle="solid";
borderwidth=1;
<![endif]-->
headerbgcolor="#E3E9F4";
if I run the menu_data.asp script I can see the following
Code:
(HeadersStyle=new mm_style())
{
headerbgcolor="#E3E9F4";
{
headerbgcolor="#E3E9F4";
as you can see (because the browser is IE) the border information is stripped out which is what I want. However the menu fails.
Is there anyway around this?
Thanks
Poster: Andy
Dated: Saturday September 30 2006 - 23:22:46 BST
Hi,
There is a much easier way to do this by using the menu's IE detection, here's how:
Code:
with(HeadersStyle=new mm_style()){
if(ie){
bordercolor="#66CCFF";
borderstyle="solid";
borderwidth=1;
}
headerbgcolor="#E3E9F4";
if(ie){
bordercolor="#66CCFF";
borderstyle="solid";
borderwidth=1;
}
headerbgcolor="#E3E9F4";
Hope this helps,
Andy