473,725 Members | 1,782 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 3315
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
40753
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
1568
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
6540
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
1891
by: Lee David | last post by:
How do you track down this to where the error actually is? TIA, Lee
2
2215
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
2216
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
6452
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
1834
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
8872
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8747
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
9392
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
9246
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
9162
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
9091
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
8069
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 projectplanning, coding, testing, and deploymentwithout 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...
0
4505
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
4773
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.