[development] using jquery to access a form element
nan_wich at bellsouth.net
Wed Jun 23 11:52:41 UTC 2010
Actually, if the same form is used more than once on a page, you can almost guarantee that it will *not* have the same name. Take a look at the comments in "form_clean_id()" concerning its effects on jQuery. I think adding a class might make this more difficult, unless that code is fully aware of multiple instances of a form on a page.
Nancy E. Wichmann, PMP
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Steven Jones
However, you cannot therefore guarantee that the form element will
always have the same ID.
Usually I'd add a class to the item I want to add the behaviour to (in
the Drupal.behaviors technique.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development