forked from jeresig/env-js
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
named form element lookup, part 1. This actually works, but is kinda …
…ugly. Part 2 will have more tests and be less hacky
- Loading branch information
Showing
3 changed files
with
113 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ea6f131
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should "label" and "option" elements be considered form elements too ? As it is for "fieldset" ...
They both have a ".form" property like others, though, not sure this entitles them as form elements !
ea6f131
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, they certainly are form elements, but the spec says you can't access them directly via document.a_form.a_element.
option element can be accessed by first finding the SELECT tag, then doing a lookup, like so:
document.a_form.a_select.an_option.
However that is not yet done (soon I hope).
Let me know if you think I miss read the spec. OR even better is to just making a tiny HTML page, and a small script to see how it works. (hey those could even be unit tests too!)
--nickg
ea6f131
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... sure, I see now what you need to do... No problem, you are correct. Thank you for the clarification !