Forums Archive Index > SmartMenus 5 > Mine won't work on IE 6 either

Author: techgroups

Date: 12 May 2005 4:15 pm

I tried looking for what Glickers solution was but I didn't understand the answer. Here is the script below. Please let me know why it's not working on IE 6


// USE WORDWRAP AND MAXIMIZE THE WINDOW TO SEE THIS FILE
// v5

// === 1 === EXTRAS
s_hideTimeout=500;//1000=1 second
s_subShowTimeout=300;//if <=100 the menus will function like SM4.x
s_subMenuOffsetX=4;//pixels (if no subs, leave as you like)
s_subMenuOffsetY=1;
s_keepHighlighted=true;
s_autoSELECTED=false;//make the item linking to the current page SELECTED
s_autoSELECTEDItemsClickable=false;//look at IMPORTANT NOTES 1 in the Manual
s_autoSELECTEDTree=true;//look at IMPORTANT NOTES 1 in the Manual
s_autoSELECTEDTreeItemsClickable=true;//look at IMPORTANT NOTES 1 in the Manual
s_scrollingInterval=30;//scrolling for tall menus
s_rightToLeft=false;
s_hideSELECTsInIE=false;//look at IMPORTANT HOWTOS 7 in the Manual


// === 2 === Default TARGET for all the links
// for navigation to frame, calling functions or
// different target for any link look at
// IMPORTANT HOWTOS 1 NOTES in the Manual
s_target='top';//(newWindow/self/top)


// === 3 === STYLESHEETS- you can define different arrays and then assign
// them to any menu you want with the s_add() function
s_CSSTop=[
'#8C8C8C', // BorderColorDOM ('top right bottom left' or 'all')
'#8C8C8C', // BorderColorNS4
1, // BorderWidth
'transparent', // BgColor
0, // Padding
'#ffffff', // ItemBgColor
'#CDCDCD', // ItemOverBgColor
'#575757', // ItemFontColor
'#FFFFFF', // ItemOverFontColor
'verdana,arial,helvetica,sans-serif', // ItemFontFamily
'10px', // ItemFontSize (css)
'1', // ItemFontSize Netscape4 (look at KNOWN BUGS 3 in the Manual)
'bold', // ItemFontWeight (bold/normal)
'left', // ItemTextAlign (left/center/right)
3, // ItemPadding
0, // ItemSeparatorSize
'#8A8CCC', // ItemSeparatorColor
'', // IEfilter (look at Samples\IE4(5.5)Filters dirs)
false, // UseSubImg
'', // SubImgSrc
'', // OverSubImgSrc
0, // SubImgWidth
0, // SubImgHeight
0, // SubImgTop px (from item top)
'#8A8CCC', // SELECTED ItemBgColor
'#FFFFFF', // SELECTED ItemFontColor
'../../../images/arrowover.gif', // SELECTED SubImgSrc
false, // UseScrollingForTallMenus
'', // ScrollingImgTopSrc
'', // ScrollingImgBottomSrc
0, // ScrollingImgWidth
0, // ScrollingImgHeight
'', // ItemClass (css)
'', // ItemOverClass (css)
'', // SELECTED ItemClass (css)
0, // ItemBorderWidth
'#CBCBEF', // ItemBorderColor ('top right bottom left' or 'all')
'#FFFFFF', // ItemBorderOverColor ('top right bottom left' or 'all')
'#FFFFFF', // SELECTED ItemBorderColor ('top right bottom left' or 'all')
0, // ItemSeparatorSpacing
'' // ItemSeparatorBgImage
];


// SAMPLE FUNCTION USED FOR RELATIVE POSITIONING
function s_getStart(a){

var bodyMarginTop=0;// specify manually to get over bugs
var bodyMarginLeft=0;// in Opera 5/6, Konqueror<3.2 and IE5.x/Mac

var o=document.images["getStart"];if(!o)return a=="x"?-630:0;

if(s_nS4)return a=="x"?o.x:o.y;
var oP,oC,ieW;oP=o.offsetParent;oC=a=="x"?o.offsetLeft:o.offsetTop;
ieW=s_iE&&!s_mC?1:0;
while(oP){if(ieW&&oP.tagName&&oP.tagName.toLowerCase()=="table"&&oP.border&&oP.border>0)oC++;oC+=a=="x"?oP.offsetLeft:oP.offsetTop;oP=oP.offsetParent};
return s_oP7m||s_kN31p&&!s_kN32p||s_iE5M?a=="x"?s_oP7m?oC:oC+bodyMarginLeft:oC+bodyMarginTop:oC};
/*
All browsers have problems with finding the real position of an
element on the page in certain cases. I have tried to get over some
browser bugs with the above function- that's why it's so complex.
*/
// SAMPLE FUNCTION USED FOR RELATIVE POSITIONING


// === 4 === MENU DEFINITIONS
s_add(
{
N:'proaudio', // NAME
LV:1, // LEVEL (look at IMPORTANT NOTES 1 in the Manual)
MinW:80, // MINIMAL WIDTH
T:'s_getStart("y")+30', // TOP (look at IMPORTANT HOWTOS 6 in the Manual)
L:'s_getStart("x")', // LEFT (look at IMPORTANT HOWTOS 6 in the Manual)
P:false, // menu is PERMANENT (you can only set true if this is LEVEL 1 menu)
S:s_CSSTop // STYLE Array to use for this menu
},
[ // define items {U:'url',T:'text' ...} look at the Manual for details
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_103',T:'Audio Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_104',T:'Audio Cassettes - Endless Loop'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_106',T:'Audio Cassettes-Instant Start'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_129',T:'Bulk High Bias Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_96',T:'Bulk Normal Bias Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_126',T:'Digital Micro Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_100',T:'Digital Tapes - ADATS'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_97',T:'Digital Tapes - DATS'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_101',T:'Digital Tapes - DTRS '},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_107',T:'Empty Reels and Boxes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_105',T:'Micro Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_102',T:'Mini Disc'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=95_113',T:'Studio Mastering Tape'}
]
);

s_add(
{N:'provideo',LV:1,MinW:80,T:'s_getStart("y")+30',L:'s_getStart("x")+90',P:false,S:s_CSSTop},
[
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_119',T:'8MM Standard Video Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_128',T:'Betacam Oxide'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_130',T:'Betacam SX-Digital'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_133',T:'Betacam-SP'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_121',T:'Bulk Video Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_127',T:'Digital Betacam'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_135',T:'DV Cam/HD Cam'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_120',T:'Hi-8MM Video'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_118',T:'Mini-DV Digital Video Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_117',T:'S-VHS Video Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_134',T:'U-Matics'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_122',T:'VHS Video Cassettes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=116_136',T:'VHS-Time Lapse Surveillance'}
]
);

s_add(
{N:'cdr',LV:1,MinW:80,T:'s_getStart("y")+30',L:'s_getStart("x")+180',P:false,S:s_CSSTop},
[
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=108_111',T:'Business Cards'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=108_109',T:'Data/Computer'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=108_112',T:'Mini'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=108_110',T:'Music/Consumer'}
]
);

s_add(
{N:'dvd',LV:1,MinW:80,T:'s_getStart("y")+30',L:'s_getStart("x")+270',P:false,S:s_CSSTop},
[
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=123_137',T:'DVD+R'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=123_125',T:'DVD-R'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=123_124',T:'DVD-Ram'}
]
);

s_add(
{N:'data',LV:1,MinW:80,T:'s_getStart("y")+30',L:'s_getStart("x")+360',P:false,S:s_CSSTop},
[
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=27_56',T:'AIT Cartridges / 8MM'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=27_57',T:'Data Mini Disc'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=27_58',T:'Data Storage Media'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=27_59',T:'DLT - Digital Linear Tape'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=27_60',T:'ZIP Disks'}
]
);

s_add(
{N:'equipment',LV:1,MinW:80,T:'s_getStart("y")+30',L:'s_getStart("x")+450',P:false,S:s_CSSTop},
[
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=26_51',T:'Audio Cassette Duplicators'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=26_52',T:'Audio Cassette Rewinder'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=26_53',T:'CD Duplicators'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=26_54',T:'CDR and DVDR Printers'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=26_55',T:'DVD Duplicators'}
]
);

s_add(
{N:'accessories',LV:1,MinW:80,T:'s_getStart("y")+30',L:'s_getStart("x")+535',P:false,S:s_CSSTop},
[
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_36',T:'Audio Cassette Storage Boxes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_39',T:'Cassette Label Applicator'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_40',T:'CD Caseliners'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_42',T:'CD Labels'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_43',T:'CDR Pens'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_44',T:'Cleaning And Editing Supplies'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_47',T:'Label Software'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_49',T:'Stock Audio Cassette Albums'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_50',T:'Storage Racks'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_141',T:'Audio Cassette Caseliners'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_38',T:'Audio Cassette Labels'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_41',T:'CD/DVD Cases'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_33',T:'Head Cleaners'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_34',T:'Laser Video Labels'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_48',T:'Mailing and CD Envelopes'},
{U:'http://www.cartepersonalizata.ro/catalog/index.php?cPath=140_35',T:'Video Boxes'}
]
);


Author: techgroups

Date: 12 May 2005 4:22 pm

--> http://www.cartepersonalizata.ro/catalog/conditions.php

it just shows a thin line it won't show the entire menu in IE 6. It works in everything else


Author: smartmenus

Date: 12 May 2005 4:52 pm

Hi,

Your source is a complete mess. :? You have 2 doctype tags, 2 opening html tags and 2 body tags. :shock:

Please correct this and after that make sure you have placed the link to the loader script right after the opening <body> tag. It should work correctly then.

Please let me know if you have any questions.

Thanks!


Author: techgroups

Date: 12 May 2005 5:45 pm

Hi Admin,

I cleaned up the code for this --> http://www.cartepersonalizata.ro/catalog/

This is an OSC installation, so there are a lot of referencing going on and so the code got a little scrambled. Either way, it's still not working even with the first code. What do I do now?


Author: techgroups

Date: 12 May 2005 5:47 pm

The code seems to be working somewhat. The drop down goes down it just only shows it in 2 pixels.... it's not displaying the whole thing.


Author: smartmenus

Date: 13 May 2005 4:08 am

smartmenus wrote:
make sure you have placed the link to the loader script right after the opening <body> tag.
I suppose you didn't understand me correctly. These words mean that you have to place the following code:
Code:
<script type="text/javascript" language="JavaScript1.2" src="s_loader.js"></script>
right after your opening body tag. In your case, it should look like this:
Code:
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<script type="text/javascript" language="JavaScript1.2" src="s_loader.js"></script>

.............. and then the rest source of your pages.


Please do this and it should work correctly in IE.

Thanks!