What's interesting is that you can use traditional DOM methods to easily
access nodes by name. According to the spec, name and id share a namespace,
and form["ident"] (same as form.ident) returns an element in the form with
the id or name "name". So you might be able to optimize your code a bit.
That said, since the spec requires name and ID to be identical, it's
technically illegal to have a name with "[" and an ID as well (since IDs
cannot contain "[").

Weird, huh?

-- Yehuda

On 12/30/06, Blair McKenzie <[EMAIL PROTECTED]> wrote:

$("[EMAIL PROTECTED]'blog[headline]']") will work. A lot slower than selecting
by id though.

Blair.

On 12/30/06, Aaron Heimlich < [EMAIL PROTECTED]> wrote:

> On 12/30/06, Jason Yeckel <[EMAIL PROTECTED]> wrote:
> >
> > Blast but it groups them in to an array and is so nice sometimes lol
> > *shrugs*
> >
>
> [] is perfectly acceptable in the "name" attribute[1][2] (in fact, PHP
> will even use them to create arrays of form variables[3]). It is not,
> however, acceptable in the "id" attribute, and using them can lead to the
> kinds of issues you are having.
>
> [1] http://www.w3.org/TR/html4/interact/forms.html#adef-name-INPUT
> [2] http://www.w3.org/TR/html4/types.html#type-cdata
> [3] http://www.php.net/manual/en/faq.html.php#faq.html.arrays
>
> --
> Aaron Heimlich
> Web Developer
> [EMAIL PROTECTED]
> http://aheimlich.freepgs.com
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/





--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to