Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | General | Q649 [ previous next ]

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

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.