Hi,
Adding DOCTYPE stops page functioning with IE!
The following HTML works (in QUIRKS) for both IE and
Firefox...alertING "Key Pressed!"...erm...when a key is pressed.
<html lang="en-US">
<head>
<title>
Keypress testing.
</title>
<meta http-equiv="Content-Type"
content="text/html;charset=utf-8" >
<script type="text/javascript" >
function handleKeyPress(evt) {
alert("Key pressed!")
}
</script>
</head>
<body onkeydown="handleKeyPress(event);">
<p>Press a key!</p>
</body>
</html>
However, adding...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
...before the <HTML>...makes the Firefox page valid AND it still works ok.
Whereas the IE page, though also now valid, but no alert appears upon key press!
What's the story?
Cheers,
Simon
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************