473,503 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mutlipel fields with same name - getting the value in Netscape

I have text fields in my form with the same name. I can reference the
value of these fields in IE 6.0 like with
document.form.field[i].value. However, netscape 4.7 seems to croak.
Why? What is the equivalent way to get the value in netscape 4.7.
Jul 20 '05 #1
1 3398
ma***********@rl.af.mil wrote:
I have text fields in my form with the same name. I can reference the
value of these fields in IE 6.0 like with
document.form.field[i].value. However, netscape 4.7 seems to croak.
Why? What is the equivalent way to get the value in netscape 4.7.


<body onload="alert(document.forms['myForm'].test[1].value);">
<form name="myForm">
<input type="text" name="test" value="1">
<input type="text" name="test" value="2">
</form>

Works fine in both Netscape 4.78 and Mozilla 1.5a.

As does document.myForm.test[1].value; and
document.forms['myForm'].elements['test'][1].value.

What doesn't work is: alert(myForm.test[1].value); since Netscape doesn't
not maintain a list of global references to forms and form elements in the
document like IE does.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #2

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

Similar topics

1
9553
by: mark.reichman | last post by:
First off.. Thanks to Grant Wagner for help in a previous thread related to this one. I am at a total loss... I have multiple fields in a form with the same name. Lets call the fields with the...
2
2069
by: Mark Stafford | last post by:
I want to use a pop-up dialog for my intranet, but I'm missing something that keeps me from getting along with NS's browsers right now. I get an error to the effect of "opener.formName has no...
7
4860
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes...
26
2149
by: Roger Desparois | last post by:
Hi, I need help : I found the simplest and most precise way to open and close submenu layers. it works perfectly with IE, but for some odd reason NS won't recognize it. Can anyone tell me why...
5
1639
by: zaw | last post by:
Hi I am working on implementing this script to shopping cart. Basically, it copies fill the shipping address from billing automatically. I believe one or more syntax is not netscape compatible....
4
2061
by: Kim14 | last post by:
I have a table that works fine in IE, but doesn't work in Netscape or Firefox. It should automatically come up with numbers in some of the fields and depending what is entered, it should calculate...
3
2149
by: Ron M | last post by:
I am sure this is a simple issue, but being a beginner I am struggling. In the following js function I am attempting to make sure no numbers are within "name" controls. I want to pass the text...
6
1903
by: qqq | last post by:
I'm a relative newbie... I'd like my site to support Netscape browsers. For a page I set 'TargetSchema' to 'IE 3.02/Netscape 3'. When I insert label or textbox web controls on the page, they...
0
7198
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,...
0
7271
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,...
0
7449
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...
1
4998
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...
0
4666
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...
0
3160
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...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
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 ...
0
373
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...

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.