Solved

Need to open up new windows and be able to use unique session variable values with the same session variable names?

Posted on 2004-10-12
5
147 Views
Last Modified: 2013-12-24
I have a situation where I need to open new windows (10 max) where the user can toggle back and forth between windows.  This is a lab inspection system where they will be inspecting up to 10 products at the same time.  Toggling between the windows.  Here is my problem:

I am passing url variables when I execute the windows.open command (see below).  I then wanted to make the url variables be session variables for the new window ONLY.  I want each window that opens to have unique session variable values, but the same names.  I am thinking that I need each new window to be independant of the other.  But it isn't working that way.  Once the session is set in one window, it changes the session values in all the other windows.

Any other suggestion are welcome.  Way to have each windows operate with independant session values, or an entiire different solution.  Here is the open.window command ... Thanks, sulzener

<SCRIPT LANGUAGE="javascript">
      window.open ('labEntry.cfm?rn=#Session.RunNumber#&pn=#Session.ProdNumber#&ud=#Session.UserDesc#&loc=#Session.LabLoc#',
               '#Session.RunNumber#','location=yes,resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes')
</SCRIPT>



0
Comment
Question by:sulzener
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 200 total points
ID: 12291701
You will not be able to store the information as session variables.

Session variables are associated with the instance of the browser.

SO take Internet Explorer for example.

If you click the blue E to run IE then you have started a session.

If you then press Ctrl+N or use any other method to open a new window - it is a child of the first and part of the same session.

If you instead click the blue E again a new instance of the program is run - therefore it has its own session info.


SO you cannot open new windows from within the same instance/session and expect to have different sessions.

You can use some other method such as continuing in the URL
You could name the session variables uniquely based off of a window ID
You could use form variables.

I just don't see a way to have "the same session and yet different sessions" at the same time.
0
 

Author Comment

by:sulzener
ID: 12292217
Thank you for clearing up some confusion I was having regarding sessions.  Can you elaborate on creating session based on window ID.  Any samples of how to do that would be great.  
0
 
LVL 17

Expert Comment

by:Tacobell777
ID: 12292662
You could make sure the urlToken is different in each window, which is a seperate session each time.
So, don't use cookies, pass the urlToken in the url, and as long as they are different for each session you'll have different sessions.

0
 

Author Comment

by:sulzener
ID: 12298866
tacobell777 ... Based upon my sample above, is it possible  to do what you are suggesting?  If not, do you have a sample?
0
 
LVL 17

Accepted Solution

by:
Tacobell777 earned 200 total points
ID: 12302046
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question