news:D4**********************************@microsof t.com...
Dave,
Thanks to both replies. I found out that the problem is that I have aRegisterStartupScript is used to inject JavaScript into web pages - not
popup
blocker set to on for the computers in which the script does not work. I
don't understand this because I have used the following script hard coded
in
another web page and it isn't blocked yet if I use the same script in the
RegisterStartupScript it is blocked. The script code I used is as
follows:
string scriptText = "printWindow = window.open('','','width=400,
height=400');";
scriptText += "printWindow.document.open();";
scriptText += "printWindow.document.write(\"<html><head><body>So me
text</body></html>\");";
scriptText += "printWindow.document.close();";
cs.RegisterStartupScript(this.GetType(), "Testwindow", scriptText, true);
write out HTML.
http://msdn.microsoft.com/en-us/library/z9h4dk8y.aspx
By the way, you *really* are in the wrong newsgroup now...
If I change true to false in the RegisterStartupScript argument, nothingThe boolean override controls whether RegisterStarupScript creates the
displays at all.
opening and closing JavaScript <scripttags...
So my question is how can I write the script so it can bypass a popupYou can't like this - that's what popup blockers are for!
blocker?
You need something like this:
http://www.asp.net/ajax/ajaxcontrolt...odalpopup.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net