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
Solved

IE v/s Netscape

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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Browser Chrome downloads colored link 5 48
Create an automated page index 9 47
Html CheckBox obtain Its Value 5 27
Html Table Looping (part 2) 5 27
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

809 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