I am developing an application that uses javascript to perform some arithmetical calculations in forms. I would like to check if javascript is enabled in user’s browser. If it is disabled redirect the user to warning page asking to enable javascript. I am aware of <noscript> tag. It is not enough just to display the message for me. I do not want to display the forms that requires javascript enabled. I do not like get_browser() function because it requires browscap.ini file that is not bundled with PHP. I would not like to remember about this file when I install application on another server. Is there any other good way to check whether javascript is enabled?
I am developing an application that uses javascript to perform some arithmetical calculations in
Share
The other way around is much simpler. Your page defaults to showing “Please enable Javascript”, and the first thing you do in your Javascript is to remove that message and do whatever you need to do.