You are here: Javascript error message using <meta> tags « HTML « IT news, forums, messages
Javascript error message using <meta> tags

Posted by Taras_96 on 10/30/06 19:30

Hi everyone,

We' ve come to the conclusion that we wish the user to be directed to
an error page if javascript is disabled <enter comment about how a
webpage shouldn't rely on javascript here :) >. I've read quite a few
posts on how to do this, but none meet my need (the two main
suggestions was set a jsEnabled variable in a <script> section of the
HTML and read it in PHP, and the other suggestion was by default
loading the non js page, and use js to redirect to the js page - I
didn't like either of them).

The behavoiur I desire is this: if(javascriptEnabled){print out
page;}else{redirect to you need to enable javascript page;}

I came up with the idea of using a meta tag in a <noscript> section,
and was hoping to get suggestions from this newsgroup. What I'm
suggesting is essentially:

<html>
<noscript>
<meta http-equiv="refresh" content="2;url=http://webdesign.about.com">
</noscript>

QST - do you have to put the absolute URL in, and can the time be zero?

The W3C says that: "Note. Some user agents support the use of META to
refresh the current page after a specified number of seconds, with the
option of replacing it by a different URI. Authors should not use this
technique to forward users to different pages, as this makes the page
inaccessible to some users. Instead, automatic page forwarding should
be done using server-side redirects." Is this because only *some* user
agents can forward the page?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация