Dag Sunde wrote:
[color=blue]
> "Randy Webb" <HikksNotAtHome@aol.com> wrote in message
> news:8_mdnWRvgMGIvCXfRVn-vw@comcast.com...
>[color=green]
>>Dag Sunde wrote:[/color]
>
> <snipped/>
>[color=green][color=darkred]
>>>I now realize that the <noscript> tag is supported all the way
>>>to xhtml strict, and all is well.
>>>[/color]
>>
>>Not as well as you think, and its material to your question.
>>
>>Leave the noscript section in the page itself. If script is not
>>available (whether not in the UA or disabled) then the page won't be
>>redirected and the user will see it. Then, it doesn't matter whether
>>noscript is supported or not.[/color]
>
>
> I did it like below, can you see any problems with that?
>
> <?xml version='1.0' encoding='iso-8859-1' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>RegWeb - Sjekker JavaScript</title>
> <link type="text/css" rel="stylesheet" href="styles/ekstranett.css" />
> <script type="text/javascript">
> function fwdOnScriptPresent() {
> document.location.href = './pages/UASettings.asp';
> }
> </script>
> </head>
>
> <body onload="fwdOnScriptPresent();">
> <noscript>[/color]
Remove the noscript tag.
[color=blue]
> <h2 style="color:red;">
> JavaScript must be supported, or turned on...
> </h2>
> <h3>How to proceed:</h3>
> <p>yada, yada...</p>
> </noscript>[/color]
Remove the closing noscript tag.
[color=blue]
> </body>
> </html>
>[/color]
Consider this scenario:
The UA doesn't support redirection via script. Whether it doesn't
support .href or the location object. The script will fail, yet the user
won't see the noscript section. Leaving it out leaves it readable by
anyone, for whatever reason, that doesn't get redirected.
There is an ongoing thread at the moment entitled "Problems with JS
turned off" that discusses this very point.
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq & newsgroup weekly