I need to write a script that posts to a form on a different site and returns the response to my site so that everything is done invisibly without necessarily leaving my site. Is this possible?
Why u need a script, u can just put a form with the right fields and the right action (the other server file) and then submit the form... ________
George, M
I want to keep the user within my site. If I did it the way you're saying, it would post to the other script and the user would be redirected somewhere else. What I need to do is post invisibly to the other script while keeping the user within my site.
Technically, it's not possible without leaving your site. If you want to post form information to another server outside of your site, you will need to submit the form to a page on that external site. In other words, the current page in the browser window is going to unload when the form is submitted. However, you can have the external site redirect back to a page on your site OR post the results on their page with a link back to your site. With some JavaScript code, you can even have the external site redirect back to your site with hidden form data (ie.. the results).
Give me some more specifics on what you are trying to do and I can probably provide some more detailed help both on ASP and JavaScript.
It is definitely not impossible. It just isn't very convenient. You could always write a COM object that gets called when your page submits. The COM object could create a URL Connection to the site that you need to communicate with and pass the required parameters and retrieves the results to display on your page.
Like, I said, it is not as convenient as submitting to a page but it is definitely possible and not extremely difficult.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.