General discussion

Locked

Pop up menu visibility(with javascript)

By siamak604 ·
I've designed a menu,but I've a problem on controling the visibility of pop up lists.
You can see the same problem in dbai municipality site.(www.dm.gov.ae)
When I move mouse to the other part of form as the menu is visible,it should hide but I can't do that.Because each time I try to do this by losting focus from list's header list's visibility gets false.

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Pop up menu visibility(with javascript)

by rgr_mi_usa In reply to Pop up menu visibility(wi ...

in the layer that displays/writes the dropdown menu items, write them between <table></table> tags. Add an onmouseover event to re-display the layer and also an onmouseout event to hide the layer.
<TABLE onmouseover = "showyourlayer();" onmouseout="hideyourlayer();" >

When the cursor leaves the table, the layer will hide.

Collapse -

Pop up menu visibility(with javascript)

by rgr_mi_usa In reply to Pop up menu visibility(wi ...

also - the solution above is for IE. For Netscape this does not work at the <table> level. To handle both browsers, put the mouseover and mouseout events on each <A HREF> tag you write in the menu

Collapse -

Pop up menu visibility(with javascript)

by siamak604 In reply to Pop up menu visibility(wi ...

The question was auto-closed by TechRepublic

Collapse -

Pop up menu visibility(with javascript)

by vcsekhar007 In reply to Pop up menu visibility(wi ...

Hi,
Try the following and customise s per ur requirements,ok?
---------------------------------------------
<html><head><title>V.C.Sekhar Parepalli</title><style type="text/css">
#divLinks{position:absolute; left:200; top:200; visibility:hidden}
#divMessage{position:absolute; left:200; width:300; top:230; visibility:hidden}
</style><script type="text/javascript" language="JavaScript">
function cb(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new cb()
msgFont='Verdana'
msgFontSize=14
msgFontColor="#800080"
msgs=new Array()
msgs[0]="This is link nr 1, you should really visit it!"
msgs[1]="Link nr 2 (this one) is even better!"
msgs[2]="This link however, nr3, isn't that good"
msgs[3]="Maybe you should try this one?"
msgs[4]="Hello?"
msgs[5]="Later all.."
msgs[6]="Done by V.C.Sekhar Parepalli" //This is the default text that appears when you mouse out
function makeChangeTextObj(obj){
this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;
this.writeref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;
this.writeIt=b_writeIt;}
function b_writeIt(text,num){
if(bw.ns4){
this.writeref.write(text)
this.writeref.close()
}else if(bw.dom){
this.writeref.replaceChild(document.createTextNode(msgs[num]),this.writeref.childNodes[0])
}else if(bw.ie4) this.writeref.innerHTML=msgs[num]
}
function changeText(num){
if(bw.bw) oMessage.writeIt('<span style="font-size:' +msgFontSize+'px; font-family:'+msgFont+'; color:'+msgFontColor+'">'+msgs[num]+'</spa

Collapse -

Pop up menu visibility(with javascript)

by siamak604 In reply to Pop up menu visibility(wi ...

The question was auto-closed by TechRepublic

Collapse -

Pop up menu visibility(with javascript)

by siamak604 In reply to Pop up menu visibility(wi ...

This question was auto closed due to inactivity

Back to Web Development Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums