Click here to Skip to main content
15,896,154 members
Articles / Web Development / ASP.NET

How to Open a New Window Even if the Pop-up Blocker Is Turned On

Rate me:
Please Sign up or sign in to vote.
1.00/5 (1 vote)
16 Dec 2018CPOL 28.6K  
Hello All,I am using the following code to open a new page in java script but web browsers are giving the warning of pop-up blocker function showPDF() { var popUp = window.open("PDFContainer.aspx", '_blank'); ...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
10 Oct 2012Sergey Alexandrovich Kryukov
This is a question of the type: "Doing X is not allowed. How to do X?" :-)If a popup blocker allowed you to do a popup, it would be a very bad blocker, and people would not use it.Please understand that a popup blocker is always a step ahead of you: it uses interface to a concrete Web...
Please Sign up or sign in to vote.
10 Oct 2012Karthik. A
I second what Sergey said. That's the whole point of having a popup blocker! Why not just open something like a jquery ui dialog ?http://jqueryui.com/dialog/[^]
Please Sign up or sign in to vote.
10 Oct 2012Abhinav S
The answer is as simple as "no you cant".Imagine you turn on a popup blocker on your browser and some malicious users is still able to open a popup when you are browsing a site - beats the whole idea of a popup blocker, doesn't it.
Please Sign up or sign in to vote.
16 Dec 2018Member 14071194
Hello All, I am using the following code to open a new page in java script but web browsers was pop-up blocked var script = "window.open('', '_blank')"; WebWindow.CurrentRequestWindow.RegisterStartupScript("clientScriptForNonModalWindow", script);

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions