Thread: tab popup sub-menu
Results 1 to 2 of 2
Related
-
How do I make a drop down menu open a popup? Forum: HTML Forum
Replies: 3 -
Jump Menu covers drop down menu Forum: HTML Forum
Replies: 1 -
popup help Forum: HTML Forum
Replies: 3 -
Pulldown menu blocks my popup menu Forum: HTML Forum
Replies: 9 -
popup window Forum: HTML Forum
Replies: 1
-
12-05-2003, 03:22 AM #1
tab popup sub-menu
I'm new to java...
I have this script, to pop up a sub-menu with links when the user rolls the mouse over the first tier menu links. But the layout of the site i'm working on has the navigation menu in a table, with each menu item in a seperate cell, and then the sub-menus would pop up in a different cell, spaning below the menu cels.
Is it possible to adjust the script for that? or do i need to create seperate scripts for each menu item???
Here is the code i have now:
<a href="home.html" onMouseover="showit(0)">Home Image</a><a href="about.html" onMouseover="showit(1)">About Image</a><a href="gallery.html" onMouseover="showit(2)">Gallery Image</a><a href="library.html" onMouseover="showit(3)">Library Image</a><a href="links.html" onMouseover="showit(4)">Links Image</a><a href="contact.html" onMouseover="showit(5)">Contact Image</a><br>
<ilayer width=600 height=16 name="dep1" bgColor="#FFFFFF">
<layer name="dep2" width=400 height=32>
</layer>
</ilayer>
<div id="describe" style="background-color:#FFFFFF;width:400px;height:32px" onMouseover="clear_delayhide()" onMouseout="resetit(event)"></div>
<script language="JavaScript1.2">
var submenu=new Array()
//Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.
submenu[0]='<font size="2" face="Verdana"><b><a href="home.html">Home</a> | <a href="updates.html">Updates</a> | <a href="sitemap.html">Site Map</a> | <a href="copyright.html">Copyright Info</a></b></font>'
submenu[1]='<font size="2" face="Verdana"><b><a href="aboutme.html">Who am i ?</a> | <a href="aboutart.html">My Art</a> | <a href="aboutlife.html">My Life</a> | <a href="aboutelse.html">LeftOvers</a></b></font>'
submenu[2]='<font size="2" face="Verdana"><b><a href="showcase.html">Portfolio</a> | <a href="fantasyart.html">Fantasy Art</a> | <a href="portraitrealism.html">Portraits & Realism</a> | <a href="figurestilllife.html">Figure Studies & Still Life</a> | <a href="sketcheswip.html">Sketches & Works in Progress</a></b></font>'
submenu[3]='<font size="2" face="Verdana"><b><a href="poetry.html">Poetry</a> | <a href="lyrics.html">Song Lyrics</a> | <a href="sstories.html">Short Stories</a> | <a href="lstories.html">Novel Beginnings</a> | <a href="ramblings.html">Ramblings</a></b></font>'
submenu[4]='<font size="2" face="Verdana"><b><a href="linksart.html">Art Related</a> | <a href="linkswriting.html">Writing References</a> | <a href="linksvgames.html">Video Gaming</a> | <a href="linkswebdesign.html">Web Design</a> | <a href="linksfun.html">Internet Fun</a> | <a href="links.html">My Favourites</a></b></font>'
submenu[5]='<font size="2" face="Verdana"><b><a href="mailto:email removed">Email Me</a> | <a href="gbook.html">GuestBook</a> | <a href="imessage.html">Instant Messengers</a></b></font>'
//Set delay before submenu disappears after mouse moves out of it (in milliseconds)
var delay_hide=500
var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""
function showit(which){
clear_delayhide()
thecontent=(which==-1)? "" : submenu[which]
if (document.getElementById||document.all)
menuobj.innerHTML=thecontent
else if (document.layers){
menuobj.document.write(thecontent)
menuobj.document.close()
}
}
function resetit(e){
if (document.all&&!menuobj.contains(e.toElement))
delayhide=setTimeout("showit(-1)",delay_hide)
else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhide=setTimeout("showit(-1)",delay_hide)
}
function clear_delayhide(){
if (window.delayhide)
clearTimeout(delayhide)
}
function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
</script>
Is this possible??? Thanks!
-
12-05-2003, 04:40 AM #2
Well, nevermind... I messed with it a bit and figured it out for myself...
Is there a way to delete threads????
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum