Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    England
    Posts
    172
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form redirect with JS ?

    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?
    \o/

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •