<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> new document </title>
</head>
<body>
<input name="one" id="two" value="" />
<div id="one"></div>
<a href="#" onclick="var a = document.getElementById('one'); var b = document.getElementById('two'); alert(a.id + ' ' + b.id);">CliCk</a>
</body>
</html>
The above snippet should never, ever produce "two two" in the alert box. It doesn't in firefox. It does in IE. We've fucked around for two weeks on and off working out just what the hell Internet Explorer was smoking, and that's it.
How hard is it to tell the difference between an ID attribute and a name?
Anyone?
The other pearler, which I can't reproduce, revolved around IE throwing a massive tantrum with input boxes and position: relative; top: -1px;
I can't write a test case for it at the moment, but telling IE to use static rather than relative worked.
No comments:
Post a Comment