Closing a dedicated login page

Discussion in 'ASP .Net Web Controls' started by Jeremy, Nov 21, 2007.

  1. Jeremy

    Jeremy Guest

    I want to use a popup login page and automatically close it when the user
    authenticates. In my OnLoggedIn event handler in the code behind in the
    popup page, I have the following:

    protected void OnLoggedIn(object sender, EventArgs e)
    {
    oSessionControl.showProgress("Authentic!!");
    Response.Write ("<script language =
    javascript>close();</script>");
    }

    However, the popup window does not close. Instead, the login document seems
    to close and the calling page displays in the same window. So at that point,
    I have 2 browser windows open and visible. Any clues?
    --
    Jeremy
    Jeremy, Nov 21, 2007
    #1
    1. Advertising

  2. Hi, Jeremy,

    I'd replace the "close()" for "window.close();"

    and add a Response.End() after the Response.Write

    Regards,

    Paulo Santos
    http://pjondevelopment.50webs.com

    On Nov 21, 6:25 pm, Jeremy <> wrote:
    > I want to use a popup login page and automatically close it when the user
    > authenticates. In my OnLoggedIn event handler in the code behind in the
    > popup page, I have the following:
    >
    > protected void OnLoggedIn(object sender, EventArgs e)
    > {
    > oSessionControl.showProgress("Authentic!!");
    > Response.Write ("<script language =
    > javascript>close();</script>");
    > }
    >
    > However, the popup window does not close. Instead, the login document seems
    > to close and the calling page displays in the same window. So at that point,
    > I have 2 browser windows open and visible. Any clues?
    > --
    > Jeremy
    PJ on Development, Nov 22, 2007
    #2
    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. Altova Announcements
    Replies:
    0
    Views:
    451
    Altova Announcements
    Jan 18, 2005
  2. Frank
    Replies:
    2
    Views:
    377
    Kevin
    Feb 26, 2005
  3. =?Utf-8?B?Vk1J?=

    Closing popup window when closing parent window?

    =?Utf-8?B?Vk1J?=, Feb 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    641
    Thomas Hansen
    Feb 15, 2007
  4. Shannon

    login page stays on login page

    Shannon, Jan 9, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    518
    Shannon
    Jan 9, 2008
  5. thomas
    Replies:
    0
    Views:
    213
    thomas
    Oct 23, 2003
Loading...

Share This Page