Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

PDF Alert Message

Avatar

Former Community Member
Hi all,



How to use a javascript before the PDF document has loaded. I need a script that once the user click on the pdf document and is loaded, displays a message i.e (Welcome to form. Please fill details and press submit). After they click OK, it returns to the normal form.



Thanks :)
4 Replies

Avatar

Level 1
Try to put this javascript code on the INITIALIZE event on the Form parent object (on the yerarchy):



app.alert("Welcome to form. Please fill details and press submit");

Avatar

Former Community Member
Thanks it worked a like a charm. What about an exclamation mark instead of a cross mark in the form.

Avatar

Former Community Member
http://slayeroffice.com/code/custom_alert/



I would like to have this format, if possible.Is there by any chance we can have it in PDF ? :)

Avatar

Level 1
Try with this:



app.alert("Welcome to form. Please fill details and press submit",1);



The possible 2nd argument can get these values:

0 for the error icon

1 for the warning icon

3 for the info icon



I don't remember wich was the icon for the "2" value ;)