469,575 Members | 1,409 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

IFRAMES and SessionIDs problems

Check out the following 2 links:
http://www.batisdev.com/admin/test_1images.asp
http://www.batisdev.com/admin/test_2images.asp

First page contain 4 IFRAMES and 1 IMG tags.
Second page contain 4 IFRAMES and 2 IMGs tags.

The problem is that the second IFRAME from the second page
generates fires a new session.

Why?

Dan Popa

Source code for first page:
<code><%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%Response.Buffer= True%>
<html>
<head>
<title>IFRAMES and SessionIDs test (with 1 IMG)</title>
<script language="JavaScript" src="FrameQueue.js"></script>
</head>
<body>
<script>
var frameChain2= new FrameQueue('frameChain2');
function startFrames(){
frameChain2.restart();
}
frameChain2.add("z1", "blank.asp?"+Math.random());
frameChain2.add("z2", "blank.asp?"+Math.random());
frameChain2.add("z3", "blank.asp?"+Math.random());
frameChain2.add("z4", "blank.asp?"+Math.random());
//window.onload = startFrames;
</script>
<%
Response.Write("SessionID:<b>" &
Session.SessionID& "</b><br>")
%>
<style>
IFRAME{width:100%; height:60px; border:1px solid blue}
</style>
This button will load the iframes one after each
other:<button onClick="startFrames()">Load
IFRAMES</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button
onClick="alert(document.cookie)">document.cookie</button>
<iframe id="z1"></iframe><iframe id="z2"></iframe><iframe
id="z3"></iframe><iframe id="z4"></iframe>
<br>
Image 1:<img src="../images/spacer.gif" width="100"
height="40" border="1" alt=""><br>

</body>
</html>
</code>
<b>Source code for the second page:</b>
<code><%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%Response.Buffer= True%>
<html>
<head>
<title>IFRAMES and SessionIDs test (with 2 IMGs)</title>
<script language="JavaScript" src="FrameQueue.js"></script>
</head>

<body>
<script>
var frameChain2= new FrameQueue('frameChain2');
function startFrames(){
frameChain2.restart();
}
frameChain2.add("z1", "blank.asp?"+Math.random());
frameChain2.add("z2", "blank.asp?"+Math.random());
frameChain2.add("z3", "blank.asp?"+Math.random());
frameChain2.add("z4", "blank.asp?"+Math.random());
//window.onload = startFrames;
</script>
<%
Response.Write("SessionID:<b>" &
Session.SessionID& "</b><br>")
%>
<style>
IFRAME{width:100%; height:60px; border:1px solid blue}
</style>
This button will load the iframes one after each
other:<button onClick="startFrames()">Load
IFRAMES</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button
onClick="alert(document.cookie)">document.cookie</button>
<iframe id="z1"></iframe><iframe id="z2"></iframe><iframe
id="z3"></iframe><iframe id="z4"></iframe>
<br>
Image 1:<img src="../images/spacer.gif" width="100"
height="40" border="1" alt=""><br>
Image 2:<img src="../images/adminTemplate_r1_c1.gif"
width="100" height="40" border="1" alt=""><br>

</body>
</html></code>
Jul 19 '05 #1
0 1769

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by maxim vexler | last post: by
7 posts views Thread by Scott | last post: by
2 posts views Thread by ja ba | last post: by
5 posts views Thread by Frances | last post: by
2 posts views Thread by Guadala Harry | last post: by
19 posts views Thread by wmanzo | last post: by
13 posts views Thread by trfilmographer | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.