Highlighted

How can I get the filename of my open pdf?

Avatar

19-08-2008

i've tried var filestoget = doc.documentFileName; but that doesn't work. Any suggestions? Or better yet, code? Thank you.

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

20-08-2008

doc is not a valid xfa command (that is an AcroForm command). To get to the doc object in xfa you must use event.target. So your command woudl be:



var filestoget = event.target.documentFileName;



Or if you prefer:



var oDoc = event.target;

var filetoget = oDoc.documentFileName;