PC Review


Reply
Thread Tools Rate Thread

Bypass Pop-up Blocker

 
 
usamaalam
Guest
Posts: n/a
 
      2nd Jan 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.

 
Reply With Quote
 
 
 
 
Hans Kesting
Guest
Posts: n/a
 
      2nd Jan 2008
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


 
Reply With Quote
 
usamaalam
Guest
Posts: n/a
 
      2nd Jan 2008
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
>
>
>

 
Reply With Quote
 
Hans Kesting
Guest
Posts: n/a
 
      2nd Jan 2008
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
>>
>>
>>



 
Reply With Quote
 
George Ter-Saakov
Guest
Posts: n/a
 
      2nd Jan 2008
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" <(E-Mail Removed)> wrote in message
news:4B0DA0E8-6B3D-4141-8701-(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Good content blocker/site blocker for Vista workstation? Leythos Windows Vista General Discussion 21 9th Feb 2009 05:00 PM
Good content blocker/site blocker for Vista workstation? Leythos Windows Vista Security 21 9th Feb 2009 05:00 PM
IE7 - Doesn't bypass Pop-up blocker with CTRL? =?Utf-8?B?eHIyODB4cg==?= Windows XP Internet Explorer 1 14th May 2007 03:38 PM
IE 6 SP2 pop-up blocker and Google Toolbar pop-up blocker HistoryFan Windows XP Internet Explorer 1 17th Nov 2004 11:14 PM
MS spam blocker and pop up blocker software. r.bosher#'ntlworld.com Microsoft Outlook 1 3rd Jul 2004 11:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:42 PM.