-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

1

3 Answers 3

1

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

<noscript>Your browser does not support JavaScript!</noscript>
Sign up to request clarification or add additional context in comments.

2 Comments

Can I stick this no script on a separate php page and then use the include(); to include this php script in any php script?
yes, you can put this code in a php file and include in all files.
1

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

1 Comment

Good answer, only reason you did not get best answer was because you lost out to Sushil who just beat you in seconds
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>

1 Comment

Good answer, others ahead of you posted their answer and hence why one of them got best answer but you are correct :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.