Im at college at the moment, i tryed it with and without the doctype and it
worked fine. They are using IE6, i cant test on IE7 until i get home.
If everything is valid i cant see there being a problem, but there obviously
it.
Regrads
James
On 10/8/07, Simon Cockayne <[EMAIL PROTECTED]> wrote:
>
> 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]
> *******************************************************************
>
>
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************