This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Can I hide the components in IE as well as Netscape.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Can I hide the components in IE as well as Netscape...." Watch "Can I hide the components in IE as well as Netscape...." New topic
Author

Can I hide the components in IE as well as Netscape....

Sanjay Bahrani
Ranch Hand

Joined: Apr 17, 2001
Posts: 38
Hi there,
I am trying to hide the link in Netscape but was not successful cauze Netscape doesnt support <div> tags and if I use layers then IE doesnt support layers.
How can i achieve this thing if i run the same html file on Netscape as well as IE....
If you have any suggessions plz. fwd it to me.
Thankz....
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I have a couple of ideas:
1) Use style sheets and set the visibility attribute to hidden or visible as appropriate for the element you wish to hide/show.
2) Use javascript to write your component dynamically based upon which browser is viewing it. For example, if you determine that I am using NS to view your page, use document.write() to add your layers. If I am in IE then you could use DIV.
HTH
[This message has been edited by Bodie Minster (edited May 08, 2001).]
Sanjay Bahrani
Ranch Hand

Joined: Apr 17, 2001
Posts: 38
Originally posted by Bodie Minster:
I have a couple of ideas:
1) Use style sheets and set the visibility attribute to hidden or visible as appropriate for the element you wish to hide/show.
2) Use javascript to write your component dynamically based upon which browser is viewing it. For example, if you determine that I am using NS to view your page, use document.write() to add your layers. If I am in IE then you could use DIV.
HTH
[This message has been edited by Bodie Minster (edited May 08, 2001).]

Hi there,
Yeah you are right, Can you send me some code for example.....
Thankz.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Like this, for example:

The other suggestion that I made was to test for which browser you are using and write your elements dynamically based on that. For example:

HTH Bodie ���
 
 
subject: Can I hide the components in IE as well as Netscape....