Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PDF form submit problem

Status
Not open for further replies.

bikh

Programmer
May 3, 2002
25
US
I have a pdf newsletter that I send out to many users. I was asked to come up with a very short questionaire, 1 or 2 questions to include with every issue. I added a form with the questions and set it to submit to a url as html. The form works, and submits the data, however, when the user submits, acrobat goes to the url where the form is submitting to. Is there a way the form can submit in the background and not go to the URL?
 
Bikh,
Did you find an answer. It seems that I have the exact opposite problem. I want the form to navigate to the submitting page, but I have a print command before the actual submit. This brings up the normal print dialog (in windows) and then it stays on the form. I have tested the submit part and found that data was sent and received, but can't seem to locate why doesnt the page change.
When I pull the print line out it works fine. Pehaps you found something?
Klaz
 
Acrobat's JavaScript DOM doesn't contain any objects, properties, or methods for opening new browser windows. You would need this to, for example, open a new window, passing in the Acrobat Form elements via a query string, and then submitting THAT window to your server for processing and any results display.

Likewise, the DOM doesn't support the "target" attribute via hyperlinks.

In short, it can't be done.

The work-around:

Submit the PDF to your server page. That page will process the results, and then as a final step, redirect back to the original PDF.

An example:
The submit is set to go to:


That php page simply redirects back to the PDF. I could, however, process the form, write data to a database, etc., and THEN redirect back to the PDF.

If you found this post helpful, please visit my site and click some of the sponsor ads. Likewise, support Tek-Tips by clicking ads/sponsors.

Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top