473,809 Members | 2,809 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 3323
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
40778
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
1575
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
6546
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
1899
by: Lee David | last post by:
How do you track down this to where the error actually is? TIA, Lee
2
2220
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
6459
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
9602
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10639
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
10376
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...
0
10120
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...
1
7661
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
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.