[Javascript] accessing a <label>

Troy III Ajnej trojani2000 at hotmail.com
Mon Jun 4 07:54:58 CDT 2007


Yeah, sibling throuh whitespace and newline characters is a major 
W3C flaw, those guys are a bunch of idiots. None of them browsers
out there will interpret empty characters or more than a single white-
space even if inside the defined html tag, than why on earth, or why 
would he for any reason wanna count newlines on his source code?
 
What possible reason would they have to mess with DOM like that?
A simple bunch of idiots,...
Thank you.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                        Troy III                            progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



> Date: Mon, 4 Jun 2007 08:42:47 -0400> From: mdougherty at pbp.com> To: javascript at latech.edu> Subject: Re: [Javascript] accessing a <label>> CC: > > On 6/3/07, diego nunes <dnunes at gmail.com> wrote:> > If using the label right before/after the <input> a good solution> > would do a search for a label in the previousSibling/nextSibling,> > comparing the "for" attribute. It wouldn't spend as much time as a> > iteration through the whole getElementsByTagName('label') would.> > In that case, I would agree with Nick that it makes as much sense to> just put the control inside the label tag. It would be easier to get> the control by id, then go to it's parentNode to get to the label than> to walk the DOM carefully ignoring whitespace siblings depending on> browser. Although once you have a decent library for cross-browser> DOM manipulation, it (probably) would be easier than iterating every> label on the form. That's why I say it depends on use what the best> solution would be. It gets even more tricky if you're trying to> develop a solution to be used against dynamic markup.> _______________________________________________> Javascript mailing list> Javascript at LaTech.edu> https://lists.LaTech.edu/mailman/listinfo/javascript
_________________________________________________________________
With Windows Live Hotmail, you can personalize your inbox with your favorite color.
www.windowslive-hotmail.com/learnmore/personalize.html?locale=en-us&ocid=TXT_TAGLM_HMWL_reten_addcolor_0607
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20070604/aaea8625/attachment.htm>


More information about the Javascript mailing list