Warning Alert

22 views
Skip to first unread message

Sakina Kanji

unread,
Apr 25, 2014, 10:33:17 AM4/25/14
to cenos...@googlegroups.com
Hi I was wondering if was possible to create a warning alert before they close the pdf to alert them if they have not completed all the aspects of the pdf. 

CenoPDF Support

unread,
Apr 25, 2014, 11:45:03 AM4/25/14
to cenos...@googlegroups.com

Hi Sakina,

 

Thanks for asking.

 

There is a Close trigger in the Document Settings. You can put Javascript to detect if all fields are finished and show alert if needed. Hope it helps.

 

Thanks,

Yang

 

--
You received this message because you are subscribed to the Google Groups "CenoPDF Support Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cenosupport...@googlegroups.com.
To post to this group, send email to cenos...@googlegroups.com.
Visit this group at http://groups.google.com/group/cenosupport.
For more options, visit https://groups.google.com/d/optout.

image001.png

Sakina Kanji

unread,
Apr 28, 2014, 2:17:30 PM4/28/14
to cenos...@googlegroups.com
i found this similar code, but i am still unsure if I can even use a function in cenopdf or if i have to call on the indviual identifies or if i could call on them based on a number
 
i would appreciate any help
 
function checkscript() {
	for (i=0;i<4;i++) {
		box = document.example.elements[i];
		if (!box.value) {
			alert('You haven\'t filled in ' + box.name + '!');
			box.focus()
			return false;
		}
	}
	return true;
}
 

CenoPDF Support

unread,
Apr 29, 2014, 2:48:01 AM4/29/14
to cenos...@googlegroups.com

Hi Sakina,

 

Your script is for HTML. So it won’t work with PDFs.

 

To use Javascript to program PDFs you will need to refer to Javascript for Acrobat API Reference that can be found from this page:

http://www.adobe.com/devnet/acrobat/javascript.html

 

In your case, you can go to CenoPDF > Document Settings to add some scripts to the “Close” trigger.

 

In your scripts, you can use getField to find the text box and use the valueAsString to check its contents.

 

Hope it helps.

 

Thanks,

Yang

 

--

Reply all
Reply to author
Forward
0 new messages