473,799 Members | 3,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Netscape and style="visibili ty:show"

I have a form and in the form, I have a drop down box. Based on what
the user selects, i want to display different input boxes. Here is my
drop down box:

<td>
<select name="reptype" onchange="check Version4()">
<option value=""></option>
<option value="A">A:</option>
<option value="B">B:</option>
<option value="C">C:</option>
</select> </td>
So, as soon as there is a change i call my "checkVersion4( )" and in
there i want to hide a this input box that I have in my form:
<div id="div1" style="visibili ty:show"> <input type="text"
name="repchapte r" />
</div>
and my method checkVersion4() is:
eval(document.d iv1.visibility = 'hidden');

I can't get this to work on Netscape I got it working on IE. Does
anyone have an idea why? Or know of a good example for Netscape or Mozilla?

Thanks

Jul 20 '05 #1
1 3320
DU
Ahmad Noori wrote:
I have a form and in the form, I have a drop down box. Based on what
the user selects, i want to display different input boxes. Here is my
drop down box:

<td>
<select name="reptype" onchange="check Version4()">
<option value=""></option>
<option value="A">A:</option>
<option value="B">B:</option>
<option value="C">C:</option>
</select> </td>
So, as soon as there is a change i call my "checkVersion4( )" and in
there i want to hide a this input box that I have in my form:
<div id="div1" style="visibili ty:show">
It's visibility:visi ble or visibility:hidd en. You're using the old (and
invalid) NS 4 property value (show).
http://www.w3.org/TR/CSS2/visufx.htm...def-visibility

<input type="text" name="repchapte r" />
</div>
and my method checkVersion4() is:
eval(document.d iv1.visibility = 'hidden');
I recommend to never use eval; 99.9% of the times, eval() is not best.
When you try to access a document node, one of the W3C DOM 2 compliant
way is to use the getElementById method. E.g.:

document.getEle mentById("div1" ).style.visibil ity = 'hidden';

which will work in all W3C compliant browsers (MSIE 5+ on all platforms,
Opera 6+, Mozilla 0.9+, NS 6+, Konqueror 3+, Safari 1.x, etc...).

I can't get this to work on Netscape I got it working on IE. Does
anyone have an idea why? Or know of a good example for Netscape or
Mozilla?

Thanks


Using Web Standards in Your Web Pages
http://www.mozilla.org/docs/web-deve...upgrade_2.html

Updating DHTML Web Pages for next generation browsers
http://devedge.netscape.com/viewsour...tml-web-pages/

You should declare a doctype and then validate your markup and CSS source.

http://www.w3.org/QA/2002/04/valid-dtd-list.html

http://validator.w3.org/

W3C Quality Assurance: Quality tips for webmasters
http://www.w3.org/QA/Tips/

Web developer documentation for Mozilla
http://www.mozilla.org/docs/web-developer/

DU
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
40770
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
1
1574
by: Perttu Pulkkinen | last post by:
I would like to have a javasript/jscript function template/"framwork" instead of checking browsers by name. The shortness of script in my opinion is not the goal, but clearness and ease iof development. Could you give your points, corrections and ideas about template below? And are elemens ids available in form or another in all browsers or was there some which accpets only element names? And was it that ancient netscape only gives form...
7
6545
by: Larry R Harrison Jr | last post by:
I am looking for javascript and a basic tutorial on how to make mouse-over drop-down menus--the type that when you "hover" over a subject links relevant to that subject "emerge" which you can then "hover" over and click. (see the links left on http://www.dpreview.com to see what I mean) I have code from smartwebby.com (DHTML) but I'm not sure if it's the best, and I'm not sure how to integrate any menus of my own into it. The code...
12
1896
by: Lee David | last post by:
How do you track down this to where the error actually is? TIA, Lee
2
2218
by: | last post by:
I have a page where I have 3 combo boxes listed in a column. sort of like: combo1 combo2 combo3 Based on which one is clicked, the others are supposed to hide (i.e. combobox.visible = false). However, when I have the bottom one in that column to be the one to be used
4
2220
by: Daniel | last post by:
Hi, I have problem to get the control id and set its visible to true/false(mean show/hide). here is my code: <%@ Control Language="vb" AutoEventWireup="false" Codebehind="ucNavbar.ascx.vb" Inherits="UserInterfaceDesign.ucNavbar" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <A id="hpL" href="" DESIGNTIMEDRAGDROP="59" runat="server"
1
6458
by: msg2ajay | last post by:
hi, i am working on <div> i have to hide some part of the table. I am not able to hide that table part can anybady tell me where is the error. <html> <head> <script type="text/javascript"> function callme(){ document.getElementById("hid").style.visibility="visible"; }
7
1842
by: r_ahimsa_m | last post by:
Hello, I am learning JavaScript. I have a table on HTML page:                 <table id="announcement_fields" border="0">                 <tbody>                 <tr>                 <td><span class="obligatory">Offer type</span>:</td>                 <td>                         <select name="offer_type" onchange="ShowAnnouncementRows();">
0
10485
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10252
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10231
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9073
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.