Solved

IE v/s Netscape

Posted on 2001-06-06
2
199 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

696 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