Solved

IE v/s Netscape

Posted on 2001-06-06
2
207 Views
Last Modified: 2010-04-09
I have got a problem of few HTML tags' properties working in IE and not working in Netscape. I 'm sending the code. Could some one help me on this :

function checkVisible(main_form,fld)
{

document.main_form.elements[fld].style.visibility="visible";
     
}

function checkInvisible(main_form,fld)
{

     document.main_form.elements[fld].style.visibility="hidden";

}


This fn is bassically to hide a control on click of a radio button and make it visible on click of the other radio button
0
Comment
Question by:arun_dp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
HHH earned 50 total points
ID: 6159064
Maybe you can use this:

if (document.layers) //NS
{
     visible = 'show';
     hidden = 'hide';
}

else //IE
if (document.all)
{
     visible = 'visible';
     hidden = 'hidden';
}

else //NS 6
if (document.getElementById)
{
          visible = 'visible';
          hidden = 'hidden';
}


if (document.layers) {
    document.layers[fld].visibility=hidden;

}
else if (document.all) {
   document.all(fld).style.visibility=hidden;

}
else if (document.getElementById) {
   document.getElementById(fld).style.visibility=hidden;
}



0
 
LVL 9

Expert Comment

by:nimaig
ID: 6159115

You cannot hide a form element in Netscape. You need to put the form element in a Layer and hide and show the layer.

For hiding a layer you can use
document.<LAYERNAME>.visibility = "hide"
document.<LAYERNAME>.visibility = "show"
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

688 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