form post to a different url in a new browser window

G

Guest

I have to send a user to a 3rd party site. Basically I am thinking I need a
linkbutton with an onclick event. The even handler would populate the
necessary values (userid, encryptedid, usergroup) and then I need to post
this information to a 3rd party site (in a new window).

From the user perspective:
User clicks on a hyperlink and a new window pops up that is the 3rd party
site and they don't have to log in.

Anybody know how to accomplish this?

Thanks
~James
 
C

Chris Fulstow

Hi James,

You might be able to achieve this by setting the target of a standard
client-side form, for example:

<form action="thirdPartySite.aspx" method="post" target="_blank">
<input type="hidden" name="userid" value="..." />
<input type="hidden" name="encryptedid" value="..." />
<input type="hidden" name="usergroup" value="..." />
</form>

You could then use a bit of client-side JavaScript on your hyperlink's
onclick event to set the hidden values and submit the form.

Hope this helps,

Chris
 
G

Guest

If the third party website has designed their web page to accept QueryString
parameters input then it would have probably defined the parameters for you.
Such as had already been mentioned in another post.

If on the other hand you are attempting to do that without the knowledge or
the design of the other website then you might as well not do it. Any change
in the other website would render your application inoperable. It would be
easier to redirect the Response to the new website and let them enter the
information there.
 
G

Guest

it has to be a post instead of a get. I was thinking last night I would
build the hyperlink dynamically that opens a page on my site in a new window
that passes the values to it. I could then take the querystring values and
populate the form values and automatically post to the third party. The new
window would then be the 3rd party site.

Thanks for kicking around ideas with me guys.
~James
--
James Coleman
Technical Director
AGENCY.COM [Chicago]


Andrew said:
Hi James,

If you have the necessary values (userid, encryptedid, usergroup) as client
side (hidden form) fields you can open a new window with JavaScript.
Something like:
onClick="window.open('http://www.3rdPartySite.com?params...

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top