473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Bypass Pop-up Blocker

Hello Everybody,

On the click of my server side button control, I am performing some server
side processing and then open a new browser window.

[code]
// Server Side Code, Database calls etc.

string js = "";
js += "<script>";
js += " window.open('" + url + "');";
js += " window.close();";
js += "</script>";

Page.RegisterStartupScript("",js);

The problem is the window is blocked by the Pop-up blocker. If I need not do
any server side processing, then I can use onClick event on a button to
directly open the window or use hyperlink, but in this case when I need to do
some processing and then open the window without letting the pop-up blocker
stop it.

Is there any way to do it?

Thanks.

Jan 2 '08 #1
4 5251
usamaalam explained on 2-1-2008 :
Hello Everybody,

On the click of my server side button control, I am performing some server
side processing and then open a new browser window.

[code]
// Server Side Code, Database calls etc.

string js = "";
js += "<script>";
js += " window.open('" + url + "');";
js += " window.close();";
js += "</script>";

Page.RegisterStartupScript("",js);

The problem is the window is blocked by the Pop-up blocker. If I need not do
any server side processing, then I can use onClick event on a button to
directly open the window or use hyperlink, but in this case when I need to do
some processing and then open the window without letting the pop-up blocker
stop it.

Is there any way to do it?

Thanks.
Maybe you can do it the other way around:
1) open a new window as a reaction to that click
2) have the url you 'show' in that popup perform the processing
3) redirect to a page that shows the results

If 'this particular' processing-run should not result in a popup, you
could close it by javascript.

Hans Kesting
Jan 2 '08 #2
Point 1 and 2 is fine, but as in point 3 if I redirect to the url from the
parent window it will show the url in the same window instead of opening it
in a new pop-up window.

What I am doing is on the click of the button, the server side event handler
is fired and it gets some data from the database and creates the url. This
url needs to be opened in a new browser window.

Thanks.

"Hans Kesting" wrote:
usamaalam explained on 2-1-2008 :
Hello Everybody,

On the click of my server side button control, I am performing some server
side processing and then open a new browser window.

[code]
// Server Side Code, Database calls etc.

string js = "";
js += "<script>";
js += " window.open('" + url + "');";
js += " window.close();";
js += "</script>";

Page.RegisterStartupScript("",js);

The problem is the window is blocked by the Pop-up blocker. If I need not do
any server side processing, then I can use onClick event on a button to
directly open the window or use hyperlink, but in this case when I need to do
some processing and then open the window without letting the pop-up blocker
stop it.

Is there any way to do it?

Thanks.

Maybe you can do it the other way around:
1) open a new window as a reaction to that click
2) have the url you 'show' in that popup perform the processing
3) redirect to a page that shows the results

If 'this particular' processing-run should not result in a popup, you
could close it by javascript.

Hans Kesting
Jan 2 '08 #3
usamaalam formulated the question :
Point 1 and 2 is fine, but as in point 3 if I redirect to the url from the
parent window it will show the url in the same window instead of opening it
in a new pop-up window.

What I am doing is on the click of the button, the server side event handler
is fired and it gets some data from the database and creates the url. This
url needs to be opened in a new browser window.

Thanks.
I probably didn't write it clearly enough, so let's try again:

1) don't process a server-click, but react client-side by opening the
popup with an intermediate page as url (you might need to add some
arguments to the url)
2) in that intermediate page, perform the processing that arrives at
the url that you really want to show (the intermediate page itself
doesn't show anything). Use the Page_Load for this.
3) at the end of the processing (in the intermediate page), redirect to
the url you found.
4) as this intermediate page is "shown" inside the popup-window, it's
this popup-window that is redirected to the new url.

Hans Kesting
>
>usamaalam explained on 2-1-2008 :
>>Hello Everybody,

On the click of my server side button control, I am performing some server
side processing and then open a new browser window.

[code]
// Server Side Code, Database calls etc.

string js = "";
js += "<script>";
js += " window.open('" + url + "');";
js += " window.close();";
js += "</script>";

Page.RegisterStartupScript("",js);

The problem is the window is blocked by the Pop-up blocker. If I need not
do any server side processing, then I can use onClick event on a button to
directly open the window or use hyperlink, but in this case when I need to
do some processing and then open the window without letting the pop-up
blocker stop it.

Is there any way to do it?

Thanks.

Maybe you can do it the other way around:
1) open a new window as a reaction to that click
2) have the url you 'show' in that popup perform the processing
3) redirect to a page that shows the results

If 'this particular' processing-run should not result in a popup, you
could close it by javascript.

Hans Kesting

Jan 2 '08 #4
There is a good replacement for old popups.
In a plain words it's using IFRAME with styling to turn it on/off..
Tkae a look here http://www.codeproject.com/KB/custom.../asppopup.aspx

George,
"usamaalam" <us*******@discussions.microsoft.comwrote in message
news:4B**********************************@microsof t.com...
Hello Everybody,

On the click of my server side button control, I am performing some server
side processing and then open a new browser window.

[code]
// Server Side Code, Database calls etc.

string js = "";
js += "<script>";
js += " window.open('" + url + "');";
js += " window.close();";
js += "</script>";

Page.RegisterStartupScript("",js);

The problem is the window is blocked by the Pop-up blocker. If I need not
do
any server side processing, then I can use onClick event on a button to
directly open the window or use hyperlink, but in this case when I need to
do
some processing and then open the window without letting the pop-up
blocker
stop it.

Is there any way to do it?

Thanks.

Jan 2 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alex Vinokur | last post by:
========================================= Windows 2000 CYGWIN_NT-5.0 1.3.22(0.78/3/2) GNU gcc version 3.2 20020927 (prerelease) ========================================= Here is some program...
1
by: shaks | last post by:
i have an executable file. when i try to put data in a numeric field and click process then a password window opens but i don't know the password. is there any way to bypass that password...
1
by: Dalan | last post by:
I have learn that there is another option for setting the allow bypass key other than through a module (for Access 97), and that it is through use of a dll. Obviously, it is fairly easy to...
1
by: Ghulam | last post by:
I am using an Access 2k ADP (Converted into ADE) front end and SQL 2K on the backend. Although I taught pretty much myself into these concept with the help of some publications and users group...
3
by: tdmailbox | last post by:
I set up my code to disable the shift bypass however for certain users I want to allow them through a button no a form to be able open up the list of tablies and queries. Is there a vb command...
2
by: Mahesh Devjibhai Dhola | last post by:
Can you please help me in my problem? I have a socket prog. application like http://www.codeproject.com/dotnet/csharpwhiteboard.asp My application is chat application like above architecture....
25
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a...
3
by: CanuckChuck | last post by:
I have a code for enabling a command button to password protect the enabling/disabling of the Shift bypass. For some reason though I keep recieving a syntax error when I try to use it. I copied the...
1
by: OlaPihl | last post by:
Hi, How can I by code enable and disable "Bypass proxy server for local adresses" in Internet Explorer / Tools / Internet Options / Connections / LAN Settings. I have made a program (VB.Net)...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.