Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q649 Can you detect if JavaScript is enabled on the users browser?

You are here: irt.org | FAQ | JavaScript | General | Q649 [ previous next ]

Yes:

<script language="JavaScript"><!--
alert('This is a JavaScript enabled browser');
//--></script>

This isn't what I suspect you wanted to know. If you need to know on the server, then you could add extra information to any:

Link:

<a href="apage.htm" onClick="this.href='apage.htm?JavaScript=enabled'">...</a>

CGI request:

<a href="cgi_program.pl" onClick="this.href='cgi_program.pl?JavaScript=enabled'">...</a>

Form:

<form name="myForm" action="whatever.htm">
<input name="JavaScript" value="" type="hidden">
</form>

<script language="JavaScript"><!--
document.myForm.JavaScript.value = 'enabled';
//--></script>

Feedback on 'Q649 Can you detect if JavaScript is enabled on the users browser?'

©2018 Martin Webb