[Zope] <noscript> and dtml
Passin, Tom
tpassin@mitretek.org
Wed, 23 Oct 2002 14:07:14 -0400
[ AM ]
> solution:
> put the following in the <head></head> section of the page. I=20
> didnt know=20
> you could put a <noscript> in there. but it works beutifully.
>=20
> <noscript>
> <meta HTTP-EQUIV=3D"REFRESH" CONTENT=3D"0; URL=3D<dtml-var=20
> "errors.no_javascript.absolute_url()">">
> </noscript>
>=20
Do not do this, because it is not valid html. A "noscript" element is
not allowed in the head element. Browsers may tolerate it, but you
should not knowingly create invalid markup.
Why not put the redirect in the body element's onLoad event? If
javascript is not enabled, nothing will happen. If it is enabled, the
javascript-aware page will get loaded.
<body onLoad=3D'window.location.replace("javascript-aware-page.html")'>
Cheers,
Tom P