By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,364 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,364 IT Pros & Developers. It's quick & easy.

Netscape : ASP Session variables across frames not accessible ?

P: n/a
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>
Jul 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2

P: n/a
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...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"A Web Master" <fo***********@hotmail.com> wrote in message
news:d2**************************@posting.google.c om...
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>

Jul 19 '05 #3

P: n/a
"Evertjan." <ex**************@interxnl.net> wrote in message news:<Xn********************@194.109.133.29>...

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.
Jul 19 '05 #4

P: n/a
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.