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

Submit to email then redirect Javascript?

obaluba
Registered: Jun 10 2008
Posts: 14

Hi, I have spent all day pulling whats left of my hair out trying to figure this out! I have searched the forum from top to bottom and as its the best one on the net, its my only hope!

What i am trying to do (with not a lot of JS experience) is setup a button which when a user has filled out my form and its clicked it will send a mailto:to an email address (i've got this bit working fine) then i need a bit of Acrobat JS which after the email has been sent the button will redirect them to a web page.

Is this possible?

Also, is it possible to make a 'Close' button which will close the pdf and return you back to the original page?

If someone could help, i'd really appreciate it!

Thanks

:)

My Product Information:
LiveCycle Designer, Windows
obaluba
Registered: Jun 10 2008
Posts: 14
anyone? someones got to have some festive cheer in them and ensure i don't spend another day trying to figure this out!! :)
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
To open a URL in a browser window, add this line to the bottom of your mail button script.

app.launchURL("http://www.example.com/", true);
Your second question is not clear to me. What "original page" do you mean?

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

grlintheworld
Registered: Dec 21 2009
Posts: 66
is it possible to do this same sort of thing when using acrobat's submit button? (i'm going to distribute my form, host it on my website, then users will just hit acrobat's submit button when they're done).

Also, I'm in Acrobat, not LiveCycle...

Thanks!
PetafromOz
Registered: Jun 8 2009
Posts: 230
Hi grlintheworld,

Yes you can add links to email or url in the LiveCycle submit button. However, whether you can do it in Acrobat, I have no idea, as I'm a LiveCycle person and have very little experience with Acrobat.

Have you asked this same question in the Acrobat forum?

from way... underground at Parkes - central West NSW - Australia

JustinB
Registered: Feb 2 2010
Posts: 1
I did get the app.launchURL("http://www.example.com/", true); to work after the submit, but it didn't take the user off the PDF, it merely opened a new window to launch the URL.

I have a situation where I want the user to click the submit button, have the PDF emailed and then have the current brower window load a new url onto the screen. This will close the pdf, and give them a "Thank you page" or similar. The reason for this is that my PDF is on a Kiosk where I need to clear the user data from the screen and provide a blank form to the next user.

Can this be accomplished?