Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Javascript Disabled in CF?

New Here ,
Mar 17, 2009 Mar 17, 2009
How and where in CF can you test to see if a Web Browser has JavaScript disabled (or does it take JS to do that)?

Can it be detected server side?

Thanks,
hefterr
461
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 18, 2009 Mar 18, 2009
You can't STRICTLY do this with CF alone as CF is a server-side application.

I would recommend setting a cookie with JavaScript into a users session, THEN use CF to try and read the cookie from the users session. If the cookie doesn't exist, it clearly means that JavaScript wasn't able to set a cookie, possibly meaning JS is disabled.

So, with this, you can do some conditional logic using CFIF and the like.

Good luck.

Mikey.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 18, 2009 Mar 18, 2009
The easiest JavaScript solution is to use the following code to display a message on the first (login?) page or the page that needs JavaScript.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 18, 2009 Mar 18, 2009
LATEST
Google "detecting javascript enabled."
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources