Checking if javascript enabled

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hame22
Forum Contributor
Posts: 214
Joined: Wed May 11, 2005 5:50 am

Checking if javascript enabled

Post by hame22 »

Hi I have an online form that uses the FCKeditior so users can add their content as formated text. However this feature will not work if javascript is disabled.

Is there a way in PHP i can determine whether or not the users browser has javascript enabled and then if it isnt instead display a standard text area rather than the FCKeditior text area?


Thanks in advance!
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

no, but there is a way to supply users who don't have javascript enabled with different html...

Code: Select all

<!-- Javascript FCKEditor goes here //-->
<noscript>
 <!-- Now you can put a regular textarea here //-->
<textarea name="asdf"></textarea>
</noscript>
I believe there's a way to have FCKEditor replace textareas too, so that you wouldn't even have to do this...
hame22
Forum Contributor
Posts: 214
Joined: Wed May 11, 2005 5:50 am

Post by hame22 »

OK, thats great thanks!
Post Reply