473,324 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

banging my head against a wall with this one

Hi,

when I try to load this page on netscape or mozilla (latest versions), I get
the error

Error: document.form1.radiogroup[0] has no properties.

It works fine on Opera or IE.

I'm sure it is something to do with the definition of the <input> tags
because if I move the type=radio to the beginning it works all right. I'm
not sure whether it's a bug in the browser or a misunderstanding on my part
which the other browsers are working around.

If this is a bug in mozilla, does anybody know any other workaround except
changing the order of the attributes. Unfortunately, I'm generating this
HTML with XSL and don't have control over the order the attributes get
generated.

<html>
<BODY onload="alert( document.form1.radiogroup[0].value);">
<FORM name="form1" id="form1" >
<input id="radiogroup" value="one" name="radiogroup" type="radio"> one
<input id="radiogroup" value="two" name="radiogroup" type="radio" > two
</FORM>
</BODY>
</html>
Jul 20 '05 #1
1 1347
"Andy Fish" <aj****@blueyonder.co.uk> writes:
I must admit I have been a bit perplexed by this whole name and id thing for
controls - why you need both and what they're for.


The short version is:

For HTML, form elements only need name attributes. If you add id
attributes, make them different from the name attributes and globally
unique. Only the name attribute is used when you submit the form.

For XHTML, only certain elements accepts the name attribute, but that
includes form elements.

/L 'please don't top post'
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

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

Similar topics

13
by: showme | last post by:
PHP and ASP.NET Go Head-to-Head By Sean Hull http://otn.oracle.com/pub/articles/hull_asp.html SUMMARY at the BOTTOM Speed and efficiency. As I mentioned earlier, ASP.NET is a framework...
87
by: ziliath | last post by:
I recently tried out the Google "top coder" contest, as a C++ coder. I noticed immediately that they expected me to know STL. To which I say, what the fuck?! I may be missing something, but at...
4
by: SteveKlett | last post by:
I took over some code for someone here and I have a real irritating situation. There are 20 or so structs that are initialized ad I need to change some of the values of these structs based on a...
4
by: Laura | last post by:
Here's the situation: I'm trying to use an update query to copy data from one row to another. Here is the situation: I have 5 companies that are linked to each other. I need to show all 5...
12
by: aegis | last post by:
What is wall clock time? the standard doesn't define it but I see its use in past posts on clc. -- aegis
10
by: Brian W | last post by:
Hi All, I have a web user control that, among other things, provides Print this page, and Email this page functionality I have this script that is to execute on the click of the asp:hyperlinks ...
7
by: darrel | last post by:
What does that MEAN? I'm working on a VS project with another person. We keep our DLLs and files in sync with each other. Last week I hit a snag where i kept getting the 'could not load type'...
1
by: rook | last post by:
Hello, Hopefully this is the right place to post my question. I'm trying to create a dynamic query by populating a select statement from an array. The code below is one fetchrow_array problem...
1
by: Martin Z | last post by:
I'm getting acquainted with the whole XML/XSD thing, and I've run into a wall. I have a tree of objects that I deserialize from XML for configuration reasons. I have generated XSD from the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.