View Full Version : Form redirect with JS ?

01-10-2003, 02:15 PM
I have an ASP form processing script which my form submits to but the asp has it's own redirecting thing so it redirects to another page. I don't want it to do this but it's remotely hosted so I can't change it.

Is there a javascript where on the form, you click submit, and it submits the form info to the script (email5.asp) but then immediately after that it makes the page redirect to a thanks page on my server?

01-10-2003, 07:19 PM
I am not sure about js but with ASP on your form page do this:

Response.Write "all of your form stuff"

'if form has been submitted then process
'this does not post back to client it redirects to another asp page
'and returns to the original page after executing
Server.Execute "pagethatprocessesform.asp"

'process is done show thank you mssg
Response.Write "thank you very much"

I am not sure how this will work being that the form processing is done on a different server...it never hurts to try though.

With js I think your only option would be to submit to an iframe. This is ie specific so it is not an ideal solution.