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
142 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
  • 2
  • 2
5 Comments
 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 200 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
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 …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now