session variable and window.open

N

Natty Gur

Hi,

As in the old happy days of ASP and COM using window.open still can end
up with new session. if you want to be sure that the new window maintain
the same session use javascript to pass cookies from the calling page to
the new one.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
M

Mark

Hi all, I have a website where I want to be able to 'pop up' a window using
the window.open call in JavaScript.
I remember back in the old days of classic ASP there was a problem where a
call to window.open started a new session and all session variables were
lost.
I did a quick check in ASP.Net and the session variables were saved between
the parent window and the new 'pop up' window so that's fine.

What I want to know is there any problems with doing this (Browser issues
etc) as I do not want to pass though any information via the Querystring
(Security issue).

Thanks in advance
Mark
 
B

Benjie Fallar

i tried to prove i said that using window.open in client-side script will
produce the same SessionID by creating two asp pages.

default.asp
<script language="javascript">
function windowOpen()
{ window.open("another.asp","_blank"); }
</script>

This is a <a href="javascript:windowOpen();">link</a>
The session id = <%=Session.SessionID%>

another.asp

<%= Session.SessionID %>

Walah!!! they produced the same SessionID value!!!

try it!
 
N

Natty Gur

Yes I know. but in my 10 years of expirence and almost 3 in ASP.NET the
same code that works, from time to time dont behave as expected and
create new session.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
B

Benjie Fallar III

i see that... thanks for your suggestion :) i guess i have to take that
one as a good advice.
 
Joined
Sep 14, 2006
Messages
6
Reaction score
0
I want each opened window to have separate session, and parent window sessions are not affected, an example is boss wants to see application from sub-ordinates point of view.
Can anybody help me.
(e-mail address removed)
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top