session variable and window.open

Discussion in 'ASP .Net' started by Benjie Fallar, Jul 10, 2003.

  1. correction: it still holds true even in classic ASP.

    "Mark" <0SPAM> wrote in message
    news:beimm4$fuu$...
    > 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
    >
    >
    Benjie Fallar, Jul 10, 2003
    #1
    1. Advertising

  2. Benjie Fallar

    Natty Gur Guest

    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


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur, Jul 10, 2003
    #2
    1. Advertising

  3. Benjie Fallar

    Mark Guest

    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
    Mark, Jul 10, 2003
    #3
  4. 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!

    "Natty Gur" <> wrote in message
    news:...
    > 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
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Benjie Fallar, Jul 10, 2003
    #4
  5. Benjie Fallar

    Natty Gur Guest

    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


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur, Jul 10, 2003
    #5
  6. i see that... thanks for your suggestion :) i guess i have to take that
    one as a good advice.



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Benjie Fallar III, Jul 10, 2003
    #6
  7. Benjie Fallar

    tittlejoseph

    Joined:
    Sep 14, 2006
    Messages:
    6
    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.

    tittlejoseph, Aug 28, 2007
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWljaGVsbGUgU3RvbmU=?=

    store javascript value from window.open in session variable

    =?Utf-8?B?TWljaGVsbGUgU3RvbmU=?=, Feb 4, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    9,434
    =?Utf-8?B?TWljaGVsbGUgU3RvbmU=?=
    Feb 4, 2004
  2. rockdale
    Replies:
    5
    Views:
    6,814
    rockdale
    Jul 5, 2006
  3. raj
    Replies:
    8
    Views:
    533
    J. Baute
    Apr 9, 2004
  4. raj
    Replies:
    0
    Views:
    185
  5. PC HUA
    Replies:
    2
    Views:
    394
    PC HUA
    May 19, 2004
Loading...

Share This Page