IFRAMES and SessionIDs problems

D

Dan Popa

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top