Solved

Alternative for IE Div tag  in Netscape Navigtor

Posted on 2001-07-26
4
171 Views
Last Modified: 2010-04-09
I have created a simple form using JSP and doing the field validations using java script. when there is any error I am displaying the corresponding error message written in DIV tag Dynamically

In form load even I am making the visibility of the DIV tag to Hidden

and when any error occurs then I am calling a function which makes the Div tag visibility property to Visible

It is working fine in Internet Explorer

I want to achieve the same functionality for Netscape Navigator 6.0 also

0
Comment
Question by:gondesiravi
[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
4 Comments
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6321341
All you need to know is the way to reference divs in Netscape...where IE would use document.all you would need document.getElementByID for Netscape 6...

Max.
0
 
LVL 2

Expert Comment

by:TenTonJim
ID: 6322723
if (document.getElementByID || document.all)
 do stuff if expression is True;


The double pipe || does not have a space between them and stands for
"logical OR".


Good luck,
Jim S.
0
 
LVL 10

Accepted Solution

by:
dij8 earned 10 total points
ID: 6329590
Netscape 4.x does not support dynamic setting through hidden and visible but hide and show.  Netscape 6 does support hidden and visible.  The key thing is accessing the object correctly.  IE uses square brackets and NS6 uses round.  That could be an issue for you.

if (document.all) {
  // do IE code
  document.all["divID"].style.visibility = "visible"
} else if (document.getElementById&&!document.all) {
  // do NS6 code
  document.getElementById("divID").style.visibility = "visible"
} else if (document.layers) {
  // do NS4.x code
  document.layers["divID"].visibility = "show"
}

0
 
LVL 10

Expert Comment

by:dij8
ID: 6333407
Glad to help.  Thanks for the A.

I just noticed you have a lot of open questions.  I recommend you go through your list of questions and revisit them to see if you can close a few of them.  I also noticed of your 23 open questions, 4 of them have your top value of 50 points.  And a lot have a lot less.  It is recommended that an easy question gets 50 points, medium 100, and hard 200 points.  You may find you get more help if you show some respect to the experts here that give you help for free by following the guidelines.

Have a look at http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp  Especially the part on "How do I get answers?"

All credit to you in that I see your grading history seems to be almost completely A's.  That is at least some way towards a great record on EE.

Nothing nasty intended by any of this.  Just some more free advice.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

734 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