Netscape : ASP Session variables across frames not accessible ?

A

A Web Master

I am designing a site for a client where I have a frameset and 3
frames (all in ASP). I am creating session variables in the frameset
that need to be accessed in the frames. It seams that in Netscape
(4.75), the Frameset Session variables are not defined when accessed
in the frames. Why and how to fix this ?

Take these for example. The only session variable contents displayed
right are the ones defined in the actual frame.

This only happens in Netscape. IE6 has no problems. I only have NE4.75
and IE6 on my PC.

I need to find either an answer, a fix or workaround a.s.a.p.

========================================================
Frameset
========================================================

<% @ Language=VBScript %>
<% session("index")="index" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>

<frameset rows="156,*" frameborder="NO" border="8" framespacing="0"
cols="*">
<frame name="topFrame" scrolling="NO" noresize src="top.asp" >
<frame name="mainFrame" src="bot.asp">
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">

</body>
</noframes>
</html>

==============================================
Top Frame
==============================================
<% @ Language=VBScript %>
<% session("top")="top" %>
<html>
<head>
<title>top</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<p>Index=<% response.write session("index") %></p>
<p>Top=<% response.write session("top") %></p>
<p>Bot=<% response.write session("bot") %></p>
</body>
</html>


==============================================
Bot Frame
==============================================
<% @ Language=VBScript %>
<% session("bot")="bot" %>
<html>
<head>
<title>bot</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<p>Index=<% response.write session("index")%></p>
<p>Top=<% response.write session("top")%></p>
<p>Bot=<% response.write session("bot")%></p>

</body>
</html>
 
E

Evertjan.

A Web Master wrote on 23 jan 2004 in
microsoft.public.inetserver.asp.general:
I am designing a site for a client where I have a frameset and 3
frames (all in ASP). I am creating session variables in the frameset
that need to be accessed in the frames. It seams that in Netscape
(4.75), the Frameset Session variables are not defined when accessed
in the frames. Why and how to fix this ?

Session variables have nothing to do with a browser.
ASP is serverside and has nothing to do with frames.

If(!!!) both frame page are called in the same session,
the session variable MUST be available.

But your top and bottom frames cannot both read the session variable
declared by the other, because one of them usually runs prior to the other.
 
A

Aaron Bertrand - MVP

Frames? Do those atrocities still exist?

In any case, no, there is no guarantee that multiple frames will share the
same session. They might each have their own session, or as Evertjan
alluded, it might be an order of operations thing...
 
A

A Web Master

Evertjan. said:
Session variables have nothing to do with a browser.
ASP is serverside and has nothing to do with frames.

If(!!!) both frame page are called in the same session,
the session variable MUST be available.

But your top and bottom frames cannot both read the session variable
declared by the other, because one of them usually runs prior to the other.

I figured that out when in each frames, I was displaying the sessionid
(even in the Frameset page). On my Netscape, all sessionids were
different. On other co-workers Netscapes, there were either showing
all same sessionsids, some identical or all different. It seams that I
can change from one Netscape to another (most probably because of
preferences ?).

Unless I have a mean of transfering infos between ASP pages with
minimal coding, I'm current starting to pass on those values in the
URL. Only problem now using this, I may have long URLs.

Can't I simply use the same sessionid for all ASP page visted by the
client ? That way, I could still use Session variables.
 
E

Evertjan.

A Web Master wrote on 23 jan 2004 in
microsoft.public.inetserver.asp.general:
I figured that out when in each frames, I was displaying the sessionid
(even in the Frameset page). On my Netscape, all sessionids were
different. On other co-workers Netscapes, there were either showing
all same sessionsids, some identical or all different. It seams that I
can change from one Netscape to another (most probably because of
preferences ?).

Unless I have a mean of transfering infos between ASP pages with
minimal coding, I'm current starting to pass on those values in the
URL. Only problem now using this, I may have long URLs.

Can't I simply use the same sessionid for all ASP page visted by the
client ? That way, I could still use Session variables.

The session ID cookie seems to be disalowed on those browsers, so switch
them on. Session id cookie is necessary for session keeping and session
keeping is necessary for session variables to work.

Otherwise you could use a database of current logons, but I am not "into"
that.
 

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,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top