Detecting script enabled

Discussion in 'ASP .Net' started by Kevin Spencer, Sep 20, 2006.

  1. Hi Barry,

    The only way to do this is on the client side, which means that your first
    Request isn't going to tell you anything, until you return your first
    Response. At that point, you can use some JavaScript on the client side to
    see whether it's enabled. If it doesn't run, it isn't enabled. For example,
    you could attempt to set the value of a hidden form field. When the page
    posts back, if the hidden form field has the same value it originally had,
    you know that the JavaScript didn't work.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Digital Carpenter

    A man, a plan, a canal,
    a palindrome that has gone to s**t.

    "Barry" <> wrote in message
    news:...
    > Hi
    >
    > How do i detect if the browser has javascript enabled.
    > Note: i am not refereing to Request.Browser.javascript
    >
    > Barry
    >
     
    Kevin Spencer, Sep 20, 2006
    #1
    1. Advertising

  2. Kevin Spencer

    Mark Rae Guest

    "Barry" <> wrote in message
    news:...

    > How do i detect if the browser has javascript enabled.
    > Note: i am not refereing to Request.Browser.javascript


    In addition to Kevin's reply, you should also look at the
    <noscript></noscript> tag - the content within that tag will run if
    JavaScript is disabled, so you can at least give the user a message saying
    that the site makes use of JavaScript, and maybe they'd like to switch it
    on...

    Disable JavaScript temporarily and then go here:
    http://www.sanctuaryrig.co.uk for an exmple.
     
    Mark Rae, Sep 20, 2006
    #2
    1. Advertising

  3. Kevin Spencer

    Barry Guest

    Hi

    How do i detect if the browser has javascript enabled.
    Note: i am not refereing to Request.Browser.javascript

    Barry
     
    Barry, Sep 21, 2006
    #3
    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. Gabor
    Replies:
    3
    Views:
    660
    Jacob Yang [MSFT]
    Aug 26, 2003
  2. GMK

    Java script enabled textbox

    GMK, Mar 9, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    23,546
    =?Utf-8?B?UyBoIGEgdSBu?=
    Mar 9, 2005
  3. =?Utf-8?B?U2FtYmE=?=

    Detecting Script enabled or not in Client Browsers

    =?Utf-8?B?U2FtYmE=?=, Jul 29, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    353
    Rob Amos
    Jul 29, 2005
  4. Matthew K Jensen

    detecting enabled network interfaces in win32

    Matthew K Jensen, Oct 17, 2004, in forum: Python
    Replies:
    4
    Views:
    486
    Tim Golden
    Oct 18, 2004
  5. Ryan Stewart

    Detecting JS enabled/capable browser

    Ryan Stewart, Dec 24, 2004, in forum: Javascript
    Replies:
    22
    Views:
    258
    Ryan Stewart
    Dec 29, 2004
Loading...

Share This Page