[thelist] Javascript broken in IE

Ken Snyder kendsnyder at gmail.com
Sat Jun 30 22:27:25 CDT 2007

Jon Hughes wrote:
> ...
> 	inputs[i].previousSibling.previousSibling.style.display =
> "none";
> ...
> This works (as far as I can tell) perfectly fine in FF, but IE 7 doesn't
> hide the error message after you submit the form again with the field
> filled in.
> ...

IE does not count white-space as a node, so the previousSibling will 
likely refer to a different node.

Try something like the example function here to see if you get better 
see http://www.w3schools.com/dom/prop_node_previoussibling.asp

-- Ken Snyder

More information about the thelist mailing list