Solved

Sending the user to an asp page from fdf JavaScript

Posted on 2003-11-10
10
336 Views
Last Modified: 2012-05-04
I have a fdf form that uses insert2gateway.asp as a email and database insert portal I have put some error checking in here to make sure everything works this is called by the JavaScript this.submitForm method,
I want to send the user to another page that check session vars I set in the gateway,
I found I can put a goto URL action in the fdf button after the JavaScript but it gets called even if the JavaScript fails.

Is their any way to do this from inside the JavaScript??
0
Comment
Question by:HamisH
  • 6
  • 2
10 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 9892036
You have to do this on the server: When the FDF is accepted, the server would then redirect the browser to a new page.
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 200 total points
ID: 9982792
Just to clarify: Neither the JavaScript submitForm command, nor the Submit action that you can use as a button action does return a status information. So it's not possbile to open a web link only on success. You can do this however on the server: The CGI script that handles your FDF submission can return a something like the following line in the header of the page:

<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=http://www.yoursite.com/newpage/">
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10341612
Why did you give a "C" grade? Just because this is not the answer you expected does not mean that the answer is wrong. I'll request a review of the grade.
0
 

Author Comment

by:HamisH
ID: 10341737
i gave a c becaue both the ansers you gave did not work a reponse.redirect form with in the asp page causes an error and becaus of the way the page is called a mett refresh wont work eather.

cheers }{amis}{
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10341753
THen you should not have closed the question and requested more information.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10349369
I just verified that a refresh does work: A PDF document in displayed in the browser. I click on the submit button, and the forms information is sent to the web server. The script that processes the data then sends a page with a refresh header. I'm doing this with a Perl CGI script, but I'm pretty sure that anything that I can do with Perl should also be possible with an ASP page.
The information in the browser changes from the PDF document to a very brief display of the redirect page, followed by the target page.

This is the script I'm using (it does not actually process anything, but this discussion, this is not important):

#!/usr/bin/perl -w
use strict;
  use CGI qw/:standard/;

  my $page= '/index.html';
  print header(-refresh => "0; URL=$page");
  print start_html, p('Please wait...'), end_html;

The actual answer to your question was that the JavaScript submitForm() command cannot be used to redirect to a different page. You can also not detect if a submission was sucessful, so it would not work to just access a web site after you call submitForm(). You would go to this new page after a sucessful, and also after an unsucessful forms submission.

In addition to answering your question, I provided a workaround.
0
 

Author Comment

by:HamisH
ID: 10350886
sorry my mestake how di i change the grade?

cheers }{amis}{
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10351018
You can probably just leave a request here, which will be picked up when the moderator reviews this question., but you can also post a request in the SUpport area (use the link at the top of the page).
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Browsers won't print to pdf 5 109
ScanSnap iX500 flips page 3 81
Need icon art 9 77
*Best* PDF to Word Convertor 4 81
Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe A recent question here at Experts Exchange piqued my interest, so I decided to provide a thorough solution and publ…
*Adobe Acrobat 9 was used for this article. Particular steps may vary depending on software versions. 1. Create a framework of your form in Word, leaving space where you’d ultimately like the Adobe fields to appear.  (Note: I use the blank lines …
In this second video of the Xpdf series, we discuss and demonstrate the PDFimages utility, which, in a single command, is able to extract all the images from a PDF file and save each one in a separate image file (PBM, PPM, or JPG). Download and inst…
In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now