472,096 Members | 1,251 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

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(object sender, EventArgs e)
{
string scriptText = "window.open('Default2.aspx','', '');";

ClientScript.RegisterStartupScript(GetType(), "MyKey", scriptText,
true);
}
==

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

Response.AddHeader("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


Aug 4 '08 #1
1 2231
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:OV**************@TK2MSFTNGP05.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(object sender, EventArgs e)
{
string scriptText = "window.open('Default2.aspx','', '');";

ClientScript.RegisterStartupScript(GetType(), "MyKey", scriptText,
true);
}
==

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

Response.AddHeader("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




Aug 4 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

52 posts views Thread by Harlan Messinger | last post: by
1 post views Thread by Logger | last post: by
1 post views Thread by Roman Roelofsen | last post: by
reply views Thread by heathy | last post: by
4 posts views Thread by ciprian.dosoftei | last post: by
4 posts views Thread by Christina | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.