The name attribute is not specified as an attribute for every element,
and there may be problems with using it on every element in XHTML. I
know that there are a few instances where it is specified, such as <a>
anchor, <button>, and <input> elements. With the <input> elements the
name attribute is necessary because it is used to identify the value
when the form is submitted. However even when an element requires the
name attribute, I would recommend also using the id attribute. However
as Walden points out there may be a problem if the <input> tags are
generated by WSG. Though in that case you could possibly do something
like this:

function generateIdsForInputElements()
 {
  var inputs = document.getElementsByTagName("input");
  var i =0;
  for (i=0:i <inputs.length:i++)
  {
   inputs(i).id = inputs(i).name;
  }
 }


>>> WaldenL@xxxxxxxxxxxxxxx 11/08/2004 12:30:18 >>>
> I'd start using id if you can.

I'm assuming that the INPUT tags are generated by WSG, and Rob doesn't
have control over them. If you can change them, Rob, do so. It's much
easier to use getElementByID

-Walden


------------
Walden H Leverich III
President & CEO
Tech Software
(516) 627-3800 x11
WaldenL@xxxxxxxxxxxxxxx 
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]

On Behalf Of Mike Eovino
Sent: Monday, 08 November, 2004 15:23
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Javascript and browser compatability

On Mon, 08 Nov 2004 12:19:14 -0800, Joe Lee <leejd@xxxxxx> wrote:
> I agree that the problem appears to be mostly caused by the use of
the
> name attribute instead of the id attribute. While there are some
> elements where it is still useful to specify the name attribute, 

Doesn't XHTML strict have a problem with the name attribute?  I know
it doesn't like it in <form> tags.  I'd start using id if you can.

Mike E.
_______________________________________________
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx 
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400 
or email: WEB400-request@xxxxxxxxxxxx 
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


_______________________________________________
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx 
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400 
or email: WEB400-request@xxxxxxxxxxxx 
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.