473,396 Members | 2,026 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,396 software developers and data experts.

How to do server-side processing and then display pop-up with pop-up blocker enabled

Hi all,

Here is what I want: when a user clicks a <asp:button>, its event
handler will do some server-side processing and then pop up a windows
of another page.

As far as I know, if no pop-up blocker is disabled, the button event
handler can be something like the following to pop-up a window after
server-side processing

// Do server-side processing first

// Then pop-up window
string strjscript = "<script language='javascript' id='PopUpScript'>";
strjscript += "window.open('popup.aspx', '_blank',
'height=300, width=200');";
strjscript += "</script" + ">";

if (!Page.IsClientScriptBlockRegistered("PopUpScript" ))
Page.RegisterClientScriptBlock("PopUpScript", strjscript);
However, google and yahoo toolbar pop-up blockers is able to block this
type of pop-up windows.

If there is no need to do server-side processing, I can do the
following in Page_Load

btnPopUp.Attributes.Add("OnClick", "window.open('popup.aspx',
'_blank', 'height=300, width=200');return false;");

Google toolbar popup-blocker won't block this type of pop-up, but
Yahoo toolbar will block it. So, if we need to get around yahoo toolbar
pop-up blocker, I think that we have to use an anchor (or
<asp:hyperlink> equivalently)

<asp:HyperLink ID="hyperlink1" NavigateUrl="PopUp.aspx" Runat="server"
Text="Click here"/>

hyperlink1.Attributes.Add("OnClick", "window.open('popup.aspx',
'_blank', 'height=300, width=200');return false;");

Unfortunately, the above methods cannot do any server-side processing
before popping-up the windows.

So, is there a method that can both do server-side processing and
bypass the pop-up blockers?

Thanks
Dominic

Feb 3 '06 #1
3 1742
yes.

1) you can use an AJAX technology to do the popup so the server is called
first.
2) do the server side process in the popup page (pass info thru the query
string - 2k limit)

-- bruce (sqlwork.com)
<do****@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi all,

Here is what I want: when a user clicks a <asp:button>, its event
handler will do some server-side processing and then pop up a windows
of another page.

As far as I know, if no pop-up blocker is disabled, the button event
handler can be something like the following to pop-up a window after
server-side processing

// Do server-side processing first

// Then pop-up window
string strjscript = "<script language='javascript' id='PopUpScript'>";
strjscript += "window.open('popup.aspx', '_blank',
'height=300, width=200');";
strjscript += "</script" + ">";

if (!Page.IsClientScriptBlockRegistered("PopUpScript" ))
Page.RegisterClientScriptBlock("PopUpScript", strjscript);
However, google and yahoo toolbar pop-up blockers is able to block this
type of pop-up windows.

If there is no need to do server-side processing, I can do the
following in Page_Load

btnPopUp.Attributes.Add("OnClick", "window.open('popup.aspx',
'_blank', 'height=300, width=200');return false;");

Google toolbar popup-blocker won't block this type of pop-up, but
Yahoo toolbar will block it. So, if we need to get around yahoo toolbar
pop-up blocker, I think that we have to use an anchor (or
<asp:hyperlink> equivalently)

<asp:HyperLink ID="hyperlink1" NavigateUrl="PopUp.aspx" Runat="server"
Text="Click here"/>

hyperlink1.Attributes.Add("OnClick", "window.open('popup.aspx',
'_blank', 'height=300, width=200');return false;");

Unfortunately, the above methods cannot do any server-side processing
before popping-up the windows.

So, is there a method that can both do server-side processing and
bypass the pop-up blockers?

Thanks
Dominic

Feb 3 '06 #2
Bruce Barker said the following on 2/3/2006 6:03 PM:
yes.

1) you can use an AJAX technology to do the popup so the server is called
first.
And then ask why it still doesn't work?
2) do the server side process in the popup page (pass info thru the query
string - 2k limit)


Assuming you get a popup to start with....

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 4 '06 #3
On 3 Feb 2006 14:19:53 -0800, do****@hotmail.com wrote:
In line...
Hi all,

Here is what I want: when a user clicks a <asp:button>, its event
handler will do some server-side processing and then pop up a windows
of another page.

As far as I know, if no pop-up blocker is disabled, the button event
handler can be something like the following to pop-up a window after
server-side processing

// Do server-side processing first

// Then pop-up window
string strjscript = "<script language='javascript' id='PopUpScript'>";
strjscript += "window.open('popup.aspx', '_blank',
'height=300, width=200');";
strjscript += "</script" + ">";

if (!Page.IsClientScriptBlockRegistered("PopUpScript" ))
Page.RegisterClientScriptBlock("PopUpScript", strjscript);
However, google and yahoo toolbar pop-up blockers is able to block this
type of pop-up windows.
Excellent! Good for them!

If there is no need to do server-side processing, I can do the
following in Page_Load

btnPopUp.Attributes.Add("OnClick", "window.open('popup.aspx',
'_blank', 'height=300, width=200');return false;");

Google toolbar popup-blocker won't block this type of pop-up, but
Yahoo toolbar will block it. So, if we need to get around yahoo toolbar
pop-up blocker, I think that we have to use an anchor (or
<asp:hyperlink> equivalently)

<asp:HyperLink ID="hyperlink1" NavigateUrl="PopUp.aspx" Runat="server"
Text="Click here"/>

hyperlink1.Attributes.Add("OnClick", "window.open('popup.aspx',
'_blank', 'height=300, width=200');return false;");

Unfortunately, the above methods cannot do any server-side processing
before popping-up the windows.

So, is there a method that can both do server-side processing and
bypass the pop-up blockers?

Thanks
Dominic


Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com
Feb 4 '06 #4

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

Similar topics

2
by: Phil | last post by:
I am using a Pascal like language (Wealth-Lab) on W2K and call this server: class HelloWorld: _reg_clsid_ = "{4E797C6A-5969-402F-8101-9C95453CF8F6}" _reg_desc_ = "Python Test COM Server"...
0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
22
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to...
14
by: Developer | last post by:
Hello All, i have recently installed VS2005 and was trying to install SQL sever 2000. I have Win XP' SP2. But when I tried installing, it only installed client tools and not the database. Can...
1
vitmca
by: vitmca | last post by:
How to configure jndi name in Jboss. I am using sql server 2005.
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.