jakepa2001
Programmer
Hi all
I'll describe what I'm trying to do, because maybe there's another avenue I haven't thought of, then I'll describe what I'm trying... All help gratefully appreciated!
I want to send users of my site, mysite.com , to a friend's site, hissite.com when they click on a link on my site. I want to send them to a given page hissite.com/targetpage.html but I want them to have a cookie that hissite.com only drops on the homepage hissite.com/index.html. So in some way I have to send my user first to the hissite.com/index.html, picking up the cookie and then forward them on hissite.com/targetpage.html with the cookie.
The way I'm doing it is with frames. In one frame I load hissite.com/index.html and in the other frame I load a page from mysite.com which redirects itself after a couple of seconds to hissite.com/targetpage.html, loading this into the top.location.href, so that the whole window is replaced by targetpage.html and the user has been successfully taken from my site to targetpage.html via hissite/index.html so he has the cookie. In theory.
In practice the problem is that this solution works on firefox browsers, but not on IE. I think it's due to cross-scripting security on IE. What happens is that the cookie dropped by hissite.com/index.html (using javascript that sets the document.cookie property) is NOT sent in the call to hissite.com/targetpage.html . If I set up the test all on one host, so that the the initial frames page, the index.html page and the targetpage.html are all on the same server, everything works fine. It's just when it's cross-site that it fails. Which is weird, because the call to hissite.com/targetpage.html is to the same server as the cookie from hissite.com/index.html came from so presents no security risk, yet IE still blocks sending the cookies..
Anyone have any suggestions, thoughts, etc? Here is the full code of what I'm doing:
Initial frameset:
<HTML><HEAD></HEAD><FRAMESET rows="*,100%">
<FRAME frameborder=0 noresize name=main src=<FRAME frameborder=0 noresize name=small src=</FRAMESET>
</HTML>
And the source of change.html:
<html>
<head>
<script language="JavaScript"><!--
function sortit() {
time1=window.setTimeout('doit()',4000);
}
function doit() {
top.location.href='}
//--></script>
</HEAD><BODY onload="sortit();"> Please wait - redirecting..</BODY></HTML>
Thanks for your help!
Bruce
I'll describe what I'm trying to do, because maybe there's another avenue I haven't thought of, then I'll describe what I'm trying... All help gratefully appreciated!
I want to send users of my site, mysite.com , to a friend's site, hissite.com when they click on a link on my site. I want to send them to a given page hissite.com/targetpage.html but I want them to have a cookie that hissite.com only drops on the homepage hissite.com/index.html. So in some way I have to send my user first to the hissite.com/index.html, picking up the cookie and then forward them on hissite.com/targetpage.html with the cookie.
The way I'm doing it is with frames. In one frame I load hissite.com/index.html and in the other frame I load a page from mysite.com which redirects itself after a couple of seconds to hissite.com/targetpage.html, loading this into the top.location.href, so that the whole window is replaced by targetpage.html and the user has been successfully taken from my site to targetpage.html via hissite/index.html so he has the cookie. In theory.
In practice the problem is that this solution works on firefox browsers, but not on IE. I think it's due to cross-scripting security on IE. What happens is that the cookie dropped by hissite.com/index.html (using javascript that sets the document.cookie property) is NOT sent in the call to hissite.com/targetpage.html . If I set up the test all on one host, so that the the initial frames page, the index.html page and the targetpage.html are all on the same server, everything works fine. It's just when it's cross-site that it fails. Which is weird, because the call to hissite.com/targetpage.html is to the same server as the cookie from hissite.com/index.html came from so presents no security risk, yet IE still blocks sending the cookies..
Anyone have any suggestions, thoughts, etc? Here is the full code of what I'm doing:
Initial frameset:
<HTML><HEAD></HEAD><FRAMESET rows="*,100%">
<FRAME frameborder=0 noresize name=main src=<FRAME frameborder=0 noresize name=small src=</FRAMESET>
</HTML>
And the source of change.html:
<html>
<head>
<script language="JavaScript"><!--
function sortit() {
time1=window.setTimeout('doit()',4000);
}
function doit() {
top.location.href='}
//--></script>
</HEAD><BODY onload="sortit();"> Please wait - redirecting..</BODY></HTML>
Thanks for your help!
Bruce