Log in

View Full Version : IFrames and Cookies



iannem
09-16-2008, 07:07 PM
Hi,

I am experiencing a problem developing a site. Basically I need to load 3 pages within a single webpage. These pages are on separate domains. Now I am aware this is possible with iframes. However I also need these 3 pages to write their own cookies.

Basically the user logins into the site and then these 3 smaller pages then log the users into individual domains on the site. At present it seems IE is preventing the cookies from being created (I believe due to a security issue possibly). Is there a way around this or a different way to enable the sites to access the cookies. Note I am not trying to access cookies set by a different domain. All I need is to allow the sites to create/access their own cookies.

Thanks In Advance

Ian

Code:


<head>
<script type='text/javascript'>

function load_complete(site) {
document.getElementById(site).value = "confirmed";
test_case();
}
</head>
<body>
<iframe name='iframe1' id='iframe1' src='http://site1.com/login.php?' width='0' height='0' frameborder='0' onLoad='load_complete("iframe1");'></iframe>
<iframe name='iframe2' id='iframe2' src='http://site2.com/login.php?' width='0' height='0' frameborder='0' onLoad='load_complete("iframe2");'></iframe>
<iframe name='iframe3' id='iframe3' src='http://site3.com/login.php?' width='0' height='0' frameborder='0' onLoad='load_complete("iframe3");'></iframe>
</body>

SpOrTsDuDe-Reese
09-17-2008, 12:24 AM
You can use IE and create an SSL certificate for your site...or have your users sign some script or something like that. I can't remember the actual technical term..