These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Detect if javascript is enabled

leithfx
Registered: Dec 6 2007
Posts: 28

How can I detect if they have javascript enabled? If they dont, I cannot do this with javascript I would think. Is there a way to check?

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
There is a bit of a conumdrum here. If JS is not enabled then there is no script that can be run to make decisions on wht to do next.

However, in Acrobat 8 there is a new document object function called "addRequirement()". With this function you can add a requirement to the document that JavaScript must be enabled.

Check it out.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

leithfx
Registered: Dec 6 2007
Posts: 28
Thanks Thom, I'll check it out.

What about having a page displayed by default that warns them that javascript is not enabled, and then I hide it using javascript? Is this too much of a hack to consider using in a real application?