Forum Moderators: open

Message Too Old, No Replies

Unique ID for spawned child window

Unique ID for spawned child window

         

Sophietje

4:10 pm on Feb 1, 2005 (gmt 0)

10+ Year Member



Is there a unique id for a spawned child window? Or a combination of ids (like session id and version id)?

What I currently have is a session-only cookie which holds the user's session id to make sure that the user's session id can only be used with this particular browser session. Since a child window shares the session cookies, it is possible to have additional windows with the same user session id cookie. I would like to be able to add a browser's id to the database to only allow a user with that exact smae browser window to access the pages.
This only needs work in IE6+.

Many thanks!

Sophietje

8:38 pm on Feb 1, 2005 (gmt 0)

10+ Year Member



I've found a work around for this:
It occured to me that I get to name the spawned window whatever I want, so that can kind of be it's own unique id. So now my code checks to see that the name of the window is the same as the user_session_id I have saved in the cookie which must be the same as the user_session_id in the database.

tedster

9:00 pm on Feb 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good one. I use a similar approach to see if my informational (onclick) pop-ups have been accessed directly from a search, rather than spawned thorugh another page's javascript.