Forum Moderators: open

Message Too Old, No Replies

Drop down menu won't work on Netscape

         

TheKing66

3:15 pm on Feb 13, 2005 (gmt 0)

10+ Year Member



Ok so i have this link and when you click on it the drop down menu appears

it works great under ALL the browsers but Nescape so here is the code. hope someone can help me

<script>
var numberOfMenus=1
var pxBetween=26
var mwidth=125
var fromLeft=201
var fromTop=253
var bgColor='#141613'
var bgColorChangeTo='#141613'
var imageHeight=18

ie=document.all?1:0
n=document.layers?1:0
function makeNewsMenu(obj,nest){
nest=(!nest)? '':'document.'+nest+'.'
this.css=(n)? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')
this.scrollHeight=n?this.css.document.height:eval('document.all.'+obj+'.offsetHeight')
this.moveIt=b_moveIt;this.bgChange=b_bgChange;
this.slideUp=b_slideUp; this.slideDown=b_slideDown;
this.clipTo=b_clipTo;
this.obj = obj + "Object"; eval(this.obj + "=this")
}
//Objects methods
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}
function b_bgChange(color){if(ie) this.css.backgroundColor=color; else this.css.bgColor=color}
function b_clipTo(t,r,b,l){
if(n){this.css.clip.top=t; this.css.clip.right=r; this.css.clip.bottom=b; this.css.clip.left=l
}else this.css.clip="rect("+t+","+r+","+b+","+l+")";
}

thats just the first part of the code, but i quite certain that the problem is in this part

Bernard Marx

5:36 pm on Feb 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This script is out of date.
Start by scrapping it and getting anew one.

tedster

3:08 pm on Feb 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One big sign that this is an old script is the test that it uses to sniff for Netscape:
n=document.layers?1:0

document.layers was only part of the Netscape 4 Document Object Model, and it vanished with Netscape 6.