Drop down menu help

T

Tricia

Hi,
Let me firstly say sorry for cross posting .

Can any one help me with is :
I wish to use in frames,so need it to layer over a frame then to open the
target in that frame.

Thanks
T

<SCRIPT language=JavaScript>
<!--
//names of dropdowns stored here
f7_droplayer=new Array()
f7_droplayer[0]="drop1"
f7_droplayer[1]="drop2"
f7_droplayer[2]="drop3"
f7_droplayer[3]="drop4"
f7_droplayer[4]="drop5"

//simple browser check
f7_v4=(parseInt(navigator.appVersion)>=4 &&
parseInt(navigator.appVersion)<=5)?1:0
f7_ie=(document.all && f7_v4)?1:0
f7_ns=(document.layers && f7_v4)?1:0


//code for drops

function f7_showdrop(thelayer){
f7_keep=thelayer; f7_hideall(); f7_showitnow=1
f7_showit(thelayer)
}

function f7_showit(thelayer){
if(f7_ie){ eval(f7_droplayer[thelayer]+'.style.visibility="visible"') }
if(f7_ns){ eval('document.'+f7_droplayer[thelayer]+'.visibility="show"');}
}


function f7_hidedrop(){
f7_keep=-1; setTimeout('f7_hideall()',500)
}

f7_keep=-1

function f7_hideall(){
for(i=0;i<f7_droplayer.length;i++){
f7_hideit=0; f7_checkmousepos(i)
if(f7_ie && f7_keep!=i){
if(f7_hideit){ eval(f7_droplayer+'.style.visibility="hidden"') }
}
if(f7_ns && f7_keep!=i){
if(f7_hideit){ eval('document.'+f7_droplayer+'.visibility="hide"') }
}
}
}

//deal with cursor over layer
document.onmousemove = f7_getmousepos
if (f7_ns) document.captureEvents(Event.MOUSEMOVE)

function f7_getmousepos(e){
if(f7_ns){f7_mousex=e.pageX; f7_mousey=e.pageY}
if(f7_ie){f7_mousex=event.clientX; f7_mousey=event.clientY;}
}

function f7_checkmousepos(i){
if(f7_ns){
f7_x_min=eval('document.'+f7_droplayer+'.left')
f7_x_max=f7_x_min+eval('document.'+f7_droplayer+'.clip.width')
f7_y_min=eval('document.'+f7_droplayer+'.top')
f7_y_max=f7_y_min+eval('document.'+f7_droplayer+'.clip.height')
}
if(f7_ie){
f7_x_min=eval(f7_droplayer+'.style.pixelLeft')
f7_x_max=f7_x_min+eval(f7_droplayer+'.style.pixelWidth')
f7_y_min=eval(f7_droplayer+'.style.pixelTop')
f7_y_max=f7_y_min+eval(f7_droplayer+'.style.pixelHeight')
}
if (f7_mousex>=f7_x_min && f7_mousex<=f7_x_max && f7_mousey>=f7_y_min &&
f7_mousey<=f7_y_max){
f7_hideit=0; setTimeout('f7_hideall()',500)
}
else { f7_hideit=1 }
return f7_hideit
}

//--></SCRIPT>
<SCRIPT language=JavaScript><!--

//browser stylesheets

if(f7_ie){
document.write('<style type="text/css"><!--')

document.write('.dropdown {padding-left:10px; padding-top:10px;
padding-right:10px; padding-bottom:10px}')
document.write('p { margin-top:0px; margin-bottom:6px }')
document.write('a { text-decoration: none }')
document.write('a:hover { color: white; text-decoration: none }')
document.write('--></style>')
}

//--></SCRIPT>


(used with) ...
<div class=dropdown id=drop1 onmouseover=f7_showdrop(0) style="left:34px;
top:88px; overflow: auto" onMouseOut=f7_hidedrop()>
<P>
.. <A class=dropitem href="shows.htm">SHOWS</A><BR>
.. <A class=dropitem href="history.htm">HISTORY</A><BR>
.. <A class=dropitem href="gallery">GALLERY</A><BR>
.. <A class=dropitem href="ghosts.htm">GHOSTS</A><BR>
.. <A class=dropitem href="news.htm">NEWS</A><BR>
</P>
</div>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,102
Messages
2,570,645
Members
47,245
Latest member
ShannonEat

Latest Threads

Top