PDA

View Full Version : How to detect javascript is enabled or not in ExtJS4.2?



khadizatahera
16 Dec 2013, 4:43 PM
Hi,

We are using ExtJS4.2. As one of our accessibility/usability requirements, we need to detect if javascript is enabled and show a message to the user if it does not.

We tried the following suggestions after the google research and found none of them working with ExtJS.

(a) <noscript> tag
(b) Use display:none and display:block accordingly as suggested in
http://stackoverflow.com/questions/2170484/shouldnt-we-use-noscript-tag
(c) Use javascript functions as suggested in http://www.sencha.com/forum/archive/index.php/t-59418.html

Actual Outcome:
ExtJS shows blank page when javascript is disabled.

Expected Outcome:
A message will be shown to the user, if Javascript is disabled.

scottmartin
17 Dec 2013, 6:32 AM
I have this in place



<div id="loading">
<div class="loading-indicator">
<script type="text/javascript">document.write('Javascript Enabled, Loading ... ');</script>
<noscript>Javascript is NOT enabled in this browser. Contact support for assistance!</noscript>
</div>
</div>

khadizatahera
17 Dec 2013, 2:46 PM
Thanks. It's working now.