Popups not working, even if Popups are allowed in IE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Moe Sisko

    Popups not working, even if Popups are allowed in IE

    Using : ASP.NET 2.0, IE 7.

    This is a strange problem with popups not working in IE to remote sites,
    even though popups are allowed in IE.

    To reproduce, create web site with two pages, Default.aspx and
    Default2.aspx. Note that the example is a deliberately simplified example -
    just used to reproduce the problem, and not meant to be very useful.

    Default.aspx - add button1. In codebehind, hookup click event :
    ==
    protected void Button1_Click(o bject sender, EventArgs e)
    {
    string scriptText = "window.open('D efault2.aspx',' ', '');";

    ClientScript.Re gisterStartupSc ript(GetType(), "MyKey", scriptText,
    true);
    }
    ==

    In Default2.aspx codebehind, add :
    ==
    protected void Page_Load(objec t sender, EventArgs e)
    {
    Response.Clear( );
    Response.Conten tType = "text/plain";

    Response.AddHea der("Content-Disposition", "attachment ; filename=" +
    "Report.txt ");

    Response.Write( "hello world");
    Response.Flush( );
    Response.End();
    }
    ==

    Browse to Default.aspx, then click button1. The intended behaviour is for a
    dialog box to come up, with something like : "Do you want to open or save
    this file ?". Then the user can view or save this file. This all works fine
    when the browser and web site are all on the same PC. Popups are enabled in
    IE. (Note that I'm using IIS to the run the pages from outside the Visual
    Studio IDE).

    However, when browsing to a remote site hosting these pages over the
    internet, even though popups are allowed for this site in IE, the dialog box
    never comes up, and the user never gets a chance to see the file. If I hold
    down the CTRL key (to disable popups for the request), then press button 1,
    then things work. But I don't understand why the CTRL key needs to be
    pressed in IE when popups are disabled.

    Using Firefox 2, things work ok.

    Has anyone seen this ? Any ideas ?
    TIA,
    Moe








  • George

    #2
    Re: Popups not working, even if Popups are allowed in IE

    You might have more than one PopUp killer in IE.

    IE has one, then any toolbar like Google toolbar, Yahoo toolbar.... might
    have another one...

    George.

    "Moe Sisko" <nullwrote in message
    news:OVVSFqe9IH A.4536@TK2MSFTN GP05.phx.gbl...
    Using : ASP.NET 2.0, IE 7.
    >
    This is a strange problem with popups not working in IE to remote sites,
    even though popups are allowed in IE.
    >
    To reproduce, create web site with two pages, Default.aspx and
    Default2.aspx. Note that the example is a deliberately simplified
    example - just used to reproduce the problem, and not meant to be very
    useful.
    >
    Default.aspx - add button1. In codebehind, hookup click event :
    ==
    protected void Button1_Click(o bject sender, EventArgs e)
    {
    string scriptText = "window.open('D efault2.aspx',' ', '');";
    >
    ClientScript.Re gisterStartupSc ript(GetType(), "MyKey", scriptText,
    true);
    }
    ==
    >
    In Default2.aspx codebehind, add :
    ==
    protected void Page_Load(objec t sender, EventArgs e)
    {
    Response.Clear( );
    Response.Conten tType = "text/plain";
    >
    Response.AddHea der("Content-Disposition", "attachment ; filename=" +
    "Report.txt ");
    >
    Response.Write( "hello world");
    Response.Flush( );
    Response.End();
    }
    ==
    >
    Browse to Default.aspx, then click button1. The intended behaviour is for
    a dialog box to come up, with something like : "Do you want to open or
    save this file ?". Then the user can view or save this file. This all
    works fine when the browser and web site are all on the same PC. Popups
    are enabled in IE. (Note that I'm using IIS to the run the pages from
    outside the Visual Studio IDE).
    >
    However, when browsing to a remote site hosting these pages over the
    internet, even though popups are allowed for this site in IE, the dialog
    box never comes up, and the user never gets a chance to see the file. If
    I hold down the CTRL key (to disable popups for the request), then press
    button 1, then things work. But I don't understand why the CTRL key needs
    to be pressed in IE when popups are disabled.
    >
    Using Firefox 2, things work ok.
    >
    Has anyone seen this ? Any ideas ?
    TIA,
    Moe
    >
    >
    >
    >
    >
    >
    >
    >

    Comment

    Working...