Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

check if javascript is enabled

Avatar

Level 4
Hi,



Is there a way to check if JavaScript is enabled on the clients Reader using FormCalc?



Thanks and regards,



Ronny Ruyters
5 Replies

Avatar

Level 4
I recall reading a blog or somewhere about some script to determine if JavaScript is enabled on the Client when the pdf form is opened, but I'll be hanged if I can find it now. Anybody recall seeing it?

Avatar

Former Community Member
How can you have javascript check to see if javascript is enabled? If it is disabled your script will not run!

Avatar

Level 4
I knew I wasn't totally hallucinating!



Adobe Reader with JavaScript Disabled

If you are looking for a simple way to provide feedback to those users who have disabled JavaScript in Adobe Reader, heres a simple approach. This works best on a flowed form as the text and space you are going to display to the user should ideally appear when script is disabled and disappear when script is enabled. Technically if a user has script disabled you cant use script to have a section of text appear or disappear so you need to have the text appear by default and then use script to have the object disappear.



In this example, the JavaScript is Disabled message appears to the user only when JavaScript has been disabled. When script is enabled the text is not displayed as the initialize code this.presence = "hidden"; causes the text itself to disappear. If your form is Flowed then the space that the text appeared in will also be removed. With a positional page, the text will disappear but the blank space will remain.



To download the sample: http://my.adobe.acrobat.com/checkforjavascriptpdfsample/



Posted by Lee Sutton at 04:14 PM

Avatar

Level 4
Of course, now I can't get the download to work . . . . :-)