Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 4th, 2003, 09:59 AM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Netscape div rollout problem

I am using the following function to hide a menu which works fine in
everything except NN 6 - the function hides the div on rolling out of the
text in the layer not the whole div itself. I used some code (borrowed from Beginning Javascript) to get around the problem in IE but cannot find equivilent code
for NN 6. Can anyone help? Regards. Incidentally I am using a NN 4 style
layer nested within a div to provide a MouseOut event for NN 4 could this
have any effect?

function hideMenu()
{
if (document.all)
{
if (event.toElement != HomeMenu && HomeMenu.contains(event.toElement) ==
false)
{
document.all.HomeMenu.style.visibility="hidden";
}
}
else if (document.layers)
{
document.HomeMenu.visibility="hidden";
}
else if (!document.all && document.getElementById)
{
document.getElementById("HomeMenu").style.visibili ty="hidden";
}

}
Reply With Quote
  #2 (permalink)  
Old June 16th, 2003, 05:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 101
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Moharo
Default

:D

where you got

else if(document.layers) {
     if(detect if using netscape navigator 4) {
          document.HomeMenu.visibility = "hide"; }

....

the genuine genius
Reply With Quote
  #3 (permalink)  
Old June 17th, 2003, 05:11 AM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It works fine in Netscape 4 (perhaps I mistyped some of the code for that bit - by the way I have a layer within a div to generate the onmouseout event as divs don't generate onmouseout events in NN4). Its Netscape 6 which has the problem. I have attached code code to make the the div disappear on mouseout. However the div disappears when I rollout the text within the div not the div itself. If you look you will see some code I 'borrowed' foe IE which gets around the same problem. I was hoping someone might know equivilent code for Netscape 6.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Positioning Problem in Firefox and Netscape echovue Javascript 3 April 13th, 2007 08:39 AM
Nested Frames problem in Netscape 7 mridangsreedhar Javascript How-To 0 May 19th, 2006 06:17 AM
Netscape div rollout problem chrisk Javascript 2 June 5th, 2003 07:58 AM



All times are GMT -4. The time now is 09:20 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.