-1

Possible Duplicate:
Display “Enable JavaScript” message only when JavaScript is disabled

I have a php document which contains both php and jquery coding. My question though is that is there a way in php where if the brower's javascript is disabled, that it displays a message stating "In order to use this application without any problems, you must have javascript enabled"?

Can the message appear straight away when the user has disabled javascript?

Thanks

Community
  • 1
  • 1
user1723710
  • 61
  • 1
  • 8
  • No need for PHP, just use HTML: https://developer.mozilla.org/en-US/docs/HTML/Element/noscript – Chad Oct 16 '12 at 15:26

3 Answers3

1

You can use noscript tag tyo detect if JavaScript not supported.

<noscript>Your browser does not support JavaScript!</noscript>
Anoop
  • 23,044
  • 10
  • 62
  • 76
1

Use the <noscipt>In order to use this application without any problems, you must have javascript enabled</noscript> Tags

zeyorama
  • 444
  • 3
  • 12
  • Good answer, only reason you did not get best answer was because you lost out to Sushil who just beat you in seconds – user1723710 Oct 16 '12 at 15:39
0

Anything surrounding by <noscript> tags is executed in the case of JavaScript being disabled, so you can simply display a warning from within a noscript block.

<noscript>In order to use this application without any problems, you must have javascript enabled</noscript>
FThompson
  • 28,352
  • 13
  • 60
  • 93
  • Good answer, others ahead of you posted their answer and hence why one of them got best answer but you are correct :) – user1723710 Oct 16 '12 at 15:40