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
149 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 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