Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2003, 09:59 AM
Registered User
 
Join Date: Jun 2003
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";
}

}
 
Old June 16th, 2003, 05:34 AM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old June 17th, 2003, 05:11 AM
Registered User
 
Join Date: Jun 2003
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.





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.