getting around popup blocker

T

TomASPNET

Hi,
I am using Button web server control which responds to a
onclick event .In the onclick event handler i am using the
serverside javascript for opening anew window.Heres the
Snippet of the code.
If someone has Popupblocker on their machine the new
window doesnt showup

-----------------------------------------------------------
---
private void butt_sales_Click(object sender,
System.Web.UI.ImageClickEventArgs e)
{
string strJscript = "<script language='javascript'>";
strJscript += "window.open
('sales.aspx','','menubar=yes,scrollbars=yes,resizable=yes,
width=640,height=500');";

strJscript += "</script" + ">";
Response.Write(strJscript);

}
 
J

John Timney \(Microsoft MVP\)

Blockers normally work by looking for typical strings of text, for example
window.open.

You could try changing it so that window.open is put together when the page
loads for example and does not exist as a string in its own right. Might
work - might not!!!

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top