I'm trying to integrate my website with a third party white label website, which can hosted within an iFrame from my website.
In order for the iFrame to load the website correctly, I need to issue a HTTP POST with credentials to a source url, passing the credentials as a querystring. The server will then respond, after which I then need to set the iFrame src attribute to the same URL I posted to, and then reload the page.
So, to recap, my HTTP POST should be to the following URL, dynamically setting in the id parameter from my codebehind before posting:
https://cads.mobile.com/WhiteLabelSite/Default.aspx?id=1234-1234-1234-1214
After the response, my site needs to redirect the iframe to that exact same URL. So I need to set the iFrame src to the dynamic URL before redirecting..
I'm not sure how to do this...sigh
sitePostRedirect.aspx
sitePostRedirect.aspx
wich will handle everything from that point. sitePostRedirect.aspx:
<form id="myForm" method="post" action="http://someurl.com" runat-"server"/>
<asp:hiddenfield id="ValueHiddenField" value="" runat="server"/>
</form>
<script>
$(document).ready(function(){
$('#myForm').submit();
});
</scrip>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.