6 messages in com.googlegroups.pylons-discussRe: Praise, validate decorator and fo...| From | Sent On | Attachments |
|---|---|---|
| Martin | 17 Aug 2006 08:06 | |
| Martin | 18 Aug 2006 04:45 | |
| Martin | 20 Aug 2006 13:08 | |
| Philip Jenvey | 20 Aug 2006 16:16 | |
| Thomas Sidwick | 21 Aug 2006 01:32 | |
| Martin | 21 Aug 2006 08:11 |
| Subject: | Re: Praise, validate decorator and formencode/javascript![]() |
|---|---|
| From: | Thomas Sidwick (tsid...@gmail.com) |
| Date: | 08/21/2006 01:32:48 AM |
| List: | com.googlegroups.pylons-discuss |
On 8/17/06, Martin <mart...@lycos.de> wrote:
3) Any JavaScript gurus here? I have read that it is not allowed to have the characters "-" and "." in JS identifiers. That only concerns the "id" of elements, right? So, the following form element would be okay, I hope: <input id="editTag" name="tags-3" type="text" value="" /> The character "-" only occurs in the name, but not in the id, so there should not be any problems? (Background: Right now I'd simply like to use the formencode nestedVariables functionality, but later on I might like to add some JavaScript... therefore it would be good to plan ahead and avoid possible conflicts later on)
I think you have got that the wrong way around.
The id attribute is used mainly by css. The name attribute is used to create the form response + creates a variable in the javascript name space.
Personally I try to keep id + name identical on form elements to avoid confusion.
I would avoid using .'s or other mathmatical symboles in either id, name, class or any other attribute that is used as a hook into another language, I can't imagine that css reacts well to having a . in the middle of a class attribute.
hth, Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to pylo...@googlegroups.com
To unsubscribe from this group, send email to
pylo...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---




