Javascript error message using <meta> tags

Discussion in 'HTML' started by Taras_96, Oct 30, 2006.

  1. Taras_96

    Taras_96 Guest

    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?
     
    Taras_96, Oct 30, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nym Pseudo

    META NAME and META HTTP-EQUIV

    Nym Pseudo, Sep 26, 2003, in forum: HTML
    Replies:
    1
    Views:
    599
    =?iso-8859-1?Q?brucie?=
    Sep 26, 2003
  2. Donald Firesmith

    html tags within meta tags allowed?

    Donald Firesmith, Jan 5, 2005, in forum: XML
    Replies:
    5
    Views:
    940
    Andy Dingley
    Jan 8, 2005
  3. Duane Johnson

    Meta methods to govern meta data?

    Duane Johnson, Oct 25, 2005, in forum: Ruby
    Replies:
    6
    Views:
    270
    Adam Sanderson
    Oct 28, 2005
  4. Erik Veenstra

    Meta-Meta-Programming

    Erik Veenstra, Feb 7, 2006, in forum: Ruby
    Replies:
    29
    Views:
    441
    Erik Veenstra
    Feb 8, 2006
  5. Taras_96
    Replies:
    6
    Views:
    137
    Randy Webb
    Nov 2, 2006
Loading...

Share This Page