473,698 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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='javas cript' id='PopUpScript '>";
strjscript += "window.open('p opup.aspx', '_blank',
'height=300, width=200');";
strjscript += "</script" + ">";

if (!Page.IsClient ScriptBlockRegi stered("PopUpSc ript"))
Page.RegisterCl ientScriptBlock ("PopUpScrip t", 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.Attrib utes.Add("OnCli ck", "window.open('p opup.aspx',
'_blank', 'height=300, width=200');ret urn 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:hyperlin k> equivalently)

<asp:HyperLin k ID="hyperlink1 " NavigateUrl="Po pUp.aspx" Runat="server"
Text="Click here"/>

hyperlink1.Attr ibutes.Add("OnC lick", "window.open('p opup.aspx',
'_blank', 'height=300, width=200');ret urn 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 1753
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.goo glegroups.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='javas cript' id='PopUpScript '>";
strjscript += "window.open('p opup.aspx', '_blank',
'height=300, width=200');";
strjscript += "</script" + ">";

if (!Page.IsClient ScriptBlockRegi stered("PopUpSc ript"))
Page.RegisterCl ientScriptBlock ("PopUpScrip t", 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.Attrib utes.Add("OnCli ck", "window.open('p opup.aspx',
'_blank', 'height=300, width=200');ret urn 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:hyperlin k> equivalently)

<asp:HyperLin k ID="hyperlink1 " NavigateUrl="Po pUp.aspx" Runat="server"
Text="Click here"/>

hyperlink1.Attr ibutes.Add("OnC lick", "window.open('p opup.aspx',
'_blank', 'height=300, width=200');ret urn 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.javas cript 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='javas cript' id='PopUpScript '>";
strjscript += "window.open('p opup.aspx', '_blank',
'height=300, width=200');";
strjscript += "</script" + ">";

if (!Page.IsClient ScriptBlockRegi stered("PopUpSc ript"))
Page.RegisterCl ientScriptBlock ("PopUpScrip t", 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.Attri butes.Add("OnCl ick", "window.open('p opup.aspx',
'_blank', 'height=300, width=200');ret urn 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:HyperLi nk ID="hyperlink1 " NavigateUrl="Po pUp.aspx" Runat="server"
Text="Click here"/>

hyperlink1.Att ributes.Add("On Click", "window.open('p opup.aspx',
'_blank', 'height=300, width=200');ret urn false;");

Unfortunatel y, 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
4582
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" _reg_progid_ = "Python.TestServer" _public_methods_ = _public_attrs_ = _readonly_attrs_ =
0
4543
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 Express Edition v1.3.2 Win, IBM Tivoli System Automation v1.2.0 Linux, IBM Tivoli Workload Scheduler Virtualized Data Centers v8.2 , other IBM Tivoli CDs, WEBSPHERE EVERYPLACE MOBILE PORTAL v5.0 - ALTIUM , other IBM WebSphere Business CDs...
22
3290
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 load DLL (aspnet_isapi.dll)." Of course the dll is able to be found, it's still in the framework directory and for grins I even put it in my service's local directory. This is apparantly server 2003 not allowing asp.net to be run if IIS was not...
14
3032
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 anyone please help me with this as I want to install SQL server and also wouold be grateful, if you can suggest me any workaround to dealwith this problem.(Like should I install any new OS etc). Any help would be appreciated.
1
2696
vitmca
by: vitmca | last post by:
How to configure jndi name in Jboss. I am using sql server 2005.
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9028
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.