<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Yeah, sibling throuh whitespace and newline characters is a major <BR>
W3C flaw, those guys are a bunch of idiots. None of them browsers<BR>
out there will interpret empty characters or more than a single white-<BR>
space even if inside the defined html tag, than why on earth, or why <BR>
would he for any reason wanna count newlines on his source code?<BR>
<BR>
What possible reason would they have to mess with DOM like that?<BR><BR>
A simple bunch of idiots,...<BR>
Thank you.<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <BR> Troy III <BR> progressive art enterprise<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR><BR><BR>
<HR id=stopSpelling>
<BR>
> Date: Mon, 4 Jun 2007 08:42:47 -0400<BR>> From: mdougherty@pbp.com<BR>> To: javascript@latech.edu<BR>> Subject: Re: [Javascript] accessing a <label><BR>> CC: <BR>> <BR>> On 6/3/07, diego nunes <dnunes@gmail.com> wrote:<BR>> > If using the label right before/after the <input> a good solution<BR>> > would do a search for a label in the previousSibling/nextSibling,<BR>> > comparing the "for" attribute. It wouldn't spend as much time as a<BR>> > iteration through the whole getElementsByTagName('label') would.<BR>> <BR>> In that case, I would agree with Nick that it makes as much sense to<BR>> just put the control inside the label tag. It would be easier to get<BR>> the control by id, then go to it's parentNode to get to the label than<BR>> to walk the DOM carefully ignoring whitespace siblings depending on<BR>> browser. Although once you have a decent library for cross-browser<BR>> DOM manipulation, it (probably) would be easier than iterating every<BR>> label on the form. That's why I say it depends on use what the best<BR>> solution would be. It gets even more tricky if you're trying to<BR>> develop a solution to be used against dynamic markup.<BR>> _______________________________________________<BR>> Javascript mailing list<BR>> Javascript@LaTech.edu<BR>> https://lists.LaTech.edu/mailman/listinfo/javascript<BR><BR><br /><hr />Change is good. See what's different about Windows Live Hotmail. <a href='www.windowslive-hotmail.com/learnmore/default.html?locale=en-us&ocid=RMT_TAGLM_HMWL_reten_changegood_0607' target='_new'>Check it out!</a></body>
</html>