Solved

obj.style.visibility = "hidden"; Problem in Firefox and Netscape

Posted on 2008-10-07
5
1,113 Views
Last Modified: 2012-05-05
Hi Folks,

I am having this problem in Firefox and Netscape

I have the following layer in my html page

<div id="nextDis" style="visibility: visible; position:absolute; left:941px; top:649px; width: 73px; height: 26px; z-index:5"><img src="../images/btn_next_disabled.jpg" alt="Next Button Disabled" name="nextDis" width="73" height="26" border="0"></div>

I am calling this function on an event

NextAble();

My problem is disappear(nextDis); DOES NOT work in Firefox and Netscape, but works in IE

The Error in Firefox is nextDis is not defined

Is there a workaround to this problem.

Thanks

RG

function NextAble(){

			if (parent.Navigation.varArray[parent.Navigation.count] == "true"){

				disappear(nextDis); // Hide the layer nextDis

				appear(nextL); // Show the layer nextL

			}

}
 

function disappear(obj) {

  if (obj.style.visibility == "visible") {

    obj.style.visibility = "hidden";

  }

}
 
 

function appear(obj) {

	if (obj.style.visibility == "hidden"){

  	 obj.style.visibility = "visible";

	}

}

Open in new window

0
Comment
Question by:rgarimella
  • 3
  • 2
5 Comments
 
LVL 82

Expert Comment

by:hielo
ID: 22659989
instead of:
visibility:hidden;

try using:
display:none;
0
 

Author Comment

by:rgarimella
ID: 22660176
I am getting the error message in firefox

nextDis is not defined, even though i have a layer named nextDis

Any ideas

RG
0
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 22660211
in your original post you have:
disappear(nextDis);

try changing that to:
disappear( document.getElementById("nextDis") );


Likewise, if you have some element with id="nextL", change:
appear(nextL)

to:
appear( document.getElementById("nextL"))
0
 

Author Comment

by:rgarimella
ID: 22660324
Great that was it

Thanks

RG
0
 
LVL 82

Expert Comment

by:hielo
ID: 22660346
you are welcome.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now