Code that checks if JavaScript is enabled or disabled

A

alec

Could a piece of code be placed in the index page of web site that checks if
JavaScript is enabled / disabled; if disabled I would like a window.alert()
to appear telling visitor that your browser JavaScript setting is disabled
and you should do following... to enable it.
Thank you for your advice and help.
 
T

Tom Pepper Willett

In html view, insert something like this in between your <head> tags:

<noscript>
<p><font face="Arial, Helvetica, Sans-Serif" size="2"><font
color="#FF0000"><b>
JavaScript Disabled</b><br>
JavaScript required to send us email. If you have disabled JavaScript<br>
in your browser, you must reenable JavaScript and refresh this
page.</font></p>
</noscript>
--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
===
| Could a piece of code be placed in the index page of web site that checks
if
| JavaScript is enabled / disabled; if disabled I would like a
window.alert()
| to appear telling visitor that your browser JavaScript setting is disabled
| and you should do following... to enable it.
| Thank you for your advice and help.
 
T

Tom Pepper Willett

"If javascript is disabled, a javascript alert doesn't work"

Huh?
--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
===
| Good response. If javascript is disabled, a javascript alert doesn't work.
| MikeR 1st
|
| Tom Pepper Willett wrote:
| > In html view, insert something like this in between your <head> tags:
| >
| > <noscript>
| > <p><font face="Arial, Helvetica, Sans-Serif" size="2"><font
| > color="#FF0000"><b>
| > JavaScript Disabled</b><br>
| > JavaScript required to send us email. If you have disabled
JavaScript<br>
| > in your browser, you must reenable JavaScript and refresh this
| > page.</font></p>
| > </noscript>
 
K

Kevin Spencer

I know what you mean, Tom. But upon a second reading of MikeR (1st)'s
response, I think he may not have been being sarcastic at all, and meant it
as a true compliment. Ambiguity does indeed have a certain quality to it!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven
 
T

Tom Pepper Willett

Oh, I didn't take it as sarcasm. I took it as a compliment, Kev. But I
simply didn't understand his answer. I took it to say if you had javascript
disabled, you couldn't my suggestion wouldn't work. Which, in fact it does,
since it's not JavaScript.

MikeR (1st) confused me.

As did Murray.


--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
===
|I know what you mean, Tom. But upon a second reading of MikeR (1st)'s
| response, I think he may not have been being sarcastic at all, and meant
it
| as a true compliment. Ambiguity does indeed have a certain quality to it!
|
| --
| HTH,
|
| Kevin Spencer
| Microsoft MVP
| .Net Developer
| The sun never sets on
| the Kingdom of Heaven
|
| | > "If javascript is disabled, a javascript alert doesn't work"
| >
| > Huh?
| > --
| > ===
| > Tom "Pepper" Willett
| > Microsoft MVP - FrontPage
| > ---
| > About FrontPage 2003:
| > http://office.microsoft.com/home/office.aspx?assetid=FX01085802
| > ===
| > | > | Good response. If javascript is disabled, a javascript alert doesn't
| > work.
| > | MikeR 1st
| > |
| > | Tom Pepper Willett wrote:
| > | > In html view, insert something like this in between your <head>
tags:
| > | >
| > | > <noscript>
| > | > <p><font face="Arial, Helvetica, Sans-Serif" size="2"><font
| > | > color="#FF0000"><b>
| > | > JavaScript Disabled</b><br>
| > | > JavaScript required to send us email. If you have disabled
| > JavaScript<br>
| > | > in your browser, you must reenable JavaScript and refresh this
| > | > page.</font></p>
| > | > </noscript>
| >
| >
|
|
 
K

Kevin Spencer

Heck, Tom, I confuse myself almost every day!

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven
 
M

MikeR

I was commenting on th OP's use below, and just read it too fast.
No sarcasm was intended, I'd expect a swift slap from Guido....
MikeR 1st

Could a piece of code be placed in the index page of web site that checks if
JavaScript is enabled / disabled; if disabled I would like a window.alert()
 
T

Tom Pepper Willett

Nah, no slap, Mike. Guido likes you too much.
--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
===
|I was commenting on th OP's use below, and just read it too fast.
| No sarcasm was intended, I'd expect a swift slap from Guido....
| MikeR 1st
|
| Could a piece of code be placed in the index page of web site that checks
if
| JavaScript is enabled / disabled; if disabled I would like a
window.alert()
|
|
| Kevin Spencer wrote:
| > Heck, Tom, I confuse myself almost every day!
| >
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top