0

I have application in which I have used two iframes to display the content of the external application.

My external site is designed in such a manner that it will dispaly the content once you login into the site otherwise it display the log-in screen again and again (if you not logged-in).

I have a url that will login into the external site(http:Ipaddress/pagename?username=abcd&password=abcd)

I set this url to the first iframe source and set another url to the other iframe

Doing this I got login and see the desired output to the first iframe but got login screen to the second iframe, however during another post back I got login to both Iframe and see the desired output.

I want both the iframe should be login duing first call.(dont know why session is not created for the second iframe)

Please help me out, Thanks Saurabh Gupta

  • It is not easy to locate the issue. Could you provide more info? Are you passing credentials in the same way for both external iFrames? – udalmik Aug 17 '12 at 13:38
  • No I am not passing the credentails for both iframes, passing only for one Iframe, second one is suppose to work with the session created by Ist iframe call – Saurabh Aug 20 '12 at 12:10

1 Answers1

0

I think it is related to p3p policy, you can check following question/answers Cookie blocked/not saved in IFRAME in Internet Explorer

Another solution is to use wrapper page for iFrame code:

<!DOCTYPE HTML>
<body>
<script type="text/javascript">
$(function(){
    $('body').append('<form id="cookiesHack" action="http://yourUrl.com/" method="get"></form>');
    $('#cookiesHack').submit();
});
</script>
</body>
Community
  • 1
  • 1
udalmik
  • 7,838
  • 26
  • 40