[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1134
  • Last Modified:

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

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
rgarimella
Asked:
rgarimella
  • 3
  • 2
1 Solution
 
hieloCommented:
instead of:
visibility:hidden;

try using:
display:none;
0
 
rgarimellaAuthor Commented:
I am getting the error message in firefox

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

Any ideas

RG
0
 
hieloCommented:
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
 
rgarimellaAuthor Commented:
Great that was it

Thanks

RG
0
 
hieloCommented:
you are welcome.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now