Print Page | Close Window

Transfering session to a new window

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3281
Printed Date: 30 March 2026 at 3:03am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Transfering session to a new window
Posted By: wwwscripts
Subject: Transfering session to a new window
Date Posted: 04 June 2003 at 7:07pm

Is it possible to transfer session variable to a new window, without doing a querystring. I am trying to open a popup window, from the main window transfer the the session value into the popup window.

Thanks,

Shrini



-------------
Welcome to the New world



Replies:
Posted By: ultramods
Date Posted: 05 June 2003 at 4:11am
Can you give a bit more details about what your are actually going to be doing?


Posted By: wwwscripts
Date Posted: 05 June 2003 at 4:25am
I just got it. If you are using Window.Open the session does pass through....

-------------
Welcome to the New world


Posted By: dbtest
Date Posted: 26 June 2003 at 4:16pm
I have the same question, could you tell me how you did it?
Thanks
Michael


Posted By: ljamal
Date Posted: 26 June 2003 at 5:19pm
As long as one browser window remains active and open the session is still open and can be called from any browser window.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: wwwscripts
Date Posted: 26 June 2003 at 6:00pm

Actually it also depends on how you open the window. There are certain ways in Javascript that will kill the session.



-------------
Welcome to the New world


Posted By: MorningZ
Date Posted: 26 June 2003 at 8:44pm

if the domains match, then the session sticks....

but if you change the domain, for instance

open http://thisdomain.com - http://thisdomain.com from a parent where its http://www.thisdomain.com - http://www.thisdomain.com , then the session will be lost

as long as they match, theres no way that session will get lost, javascript CANNOT kill server session/memory



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: dbtest
Date Posted: 27 June 2003 at 6:13am
My problem is: I used window.open("xxx.jsp","",prop-variable) to open another jsp page, relative url, same domain, in the same folder. In the main page I set a session variable and the main page is open when the new window is up. The session variable is gone in the new window. It seems to me that the new window kill all the session variable from parent.

It will be great if someone can give me a hint how to pass the session variable to the window from window.open().

Thanks everyone.

Michael



Posted By: MorningZ
Date Posted: 27 June 2003 at 6:23am

"It seems to me that the new window kill all the session variable from parent. "

well, javascript cannot kill your session on the server (understand its two TOTALLY differernt "areas"), you have other issues.....  what they are i couldn't tell you by the limited info you give, but rest assured that javascript doesn't kill IIS memory



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: dbtest
Date Posted: 27 June 2003 at 6:49am
I think I use misleading word "kill". What I actually mean is that the new window can't read the session variable values set in the parent window, while in parent window I can always get the session value before and after the new window is up, that's no problem.

For example, I set the session variable ("option") equal to "1" in parent window. In the new window I can't not get the value of session variable "option", it's just "null". It will be great if I can get the "1" in the child window.

Thanks



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net