Click here to Skip to main content
15,887,376 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi!

I have a website made from asp classic. it has a form that will send action to a certain website. then the website will send a return.

this is how i send post.

<form name='postURL' action='URL' method='post'>
<input type="text" name="Param1" value= ''/>
<input type="text" name="Param2" value='<'/>
<input type="text" name="Param3" value=''/> </form>

after posting. my site will be redirected to a new URL:
and display something like this:
{"resultCode":"000","resultMsg":"Success","txnToken":"cRmQsu1JV81eacb78f82da"}

my question is how do a get the response without redirecting this a new URL?

appreciate your feedback guys.

Thank you.

What I have tried:

here is my code

<form name='postURL' action='URL' method='post'>
<input type="text" name="Param1" value= ''/>
<input type="text" name="Param2" value='<'/>
<input type="text" name="Param3" value=''/> </form>
Posted
Updated 14-Mar-16 3:54am

1 solution

Easiest way will be to use jQuery and do an ajax call and use the "complete" event to examine the status that is returned, or if you're only interested in success or failure then use the relevant events for that

jQuery.ajax() | jQuery API Documentation[^]

If you google how to post a form with jquery ajax you should find examples of how to read the form variables and post them.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900