logo
  • Jobs
  • About Me
  • Contact
  • Home
« My new toy
Numa Numa »

Popup Tester Web Control

Posted March 1st, 2005 by Matt Berther

A realization that I came to in the recent past was the lack of usability around a lot of web applications. Take for example Outlook Web Access (OWA). A fundamental piece of this appplication is the ability to use popups. For the past 6 months or so, I have not been able to use our OWA installation, because everytime I clicked on Reply, the window just went away.

It finally dawned on me last week that the reason why this was happening was because of FireFox’s popup blocker. Why then, would OWA not tell me that I need to disable my popup blocker to let the application function properly?

With that, I’ve made a control that will make it easy for anyone to add tests for popup blockers to their ASP.NET applications. The PopupTester control is derived from Panel, which means that it is a container control to which you can simply add whatever other controls you want to display if a popup blocker is found.

Using this control is as easy as 1, 2, 3:

  1. Add a reference to MattBerther.Web.PopupTester.dll from your ASP.NET application
  2. Register the control on your aspx page with [asp]< %@ Register TagPrefix="mbw" Namespace="MattBerther.Web.UI.WebControls" Assembly="MattBerther.Web.PopupTester" %>[/asp]
  3. Add an instance to your aspx page with [asp]Popups are being blocked[/asp]

Again, you are free to place whatever content you like inside the PopupTester control. The control will render with a style of display:none, unless a popup blocker is found. If one is found, it renders with display:block. This control should work with Netscape, Internet Explorer and FireFox.

If you’re using popups in an ASP.NET application, you owe it to your users to give this control a shot. There is no cost, so what do you have to lose?

If you are using this, Id love to hear your thoughts about it…

Download now (with source) [ msi | zip ]

This entry was posted on Tuesday, March 1st, 2005 at 2:28 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

David Starr
March 1st, 2005

Nice!

JonGalloway.ToString()
March 4th, 2005

[asp.net] Popup Tester Web Control

Tim Haines
March 4th, 2005

Using Popups on your web pages?

ComputerZen.com - Scott Hanselman's Weblog
March 7th, 2005

ASP.NET Rolled up Goodness

Ralf Mueller
March 8th, 2005

Seems to be a nice control - but can you explain how you do the test for a popup blocker?
This would help non ASP-Users to understand your thoughts :-)

Matt Berther
March 8th, 2005

The whole meat of this control is a simple javascript file. The javascript file tries to open a window, and if the window is opened then popup blockers are assumed to not be present.

If the window is not able to be opened, it tries again with a slightly different mechanism. If both tries fail, then a popup blocker is assumed to be installed.

blog.codespace.de
March 13th, 2005

YARBS…oder so ähnlich

sujatha
March 16th, 2005

i cannot open pop up window.
when i open that blank screen with no content is displaying
plz help me.
sujatha

Matt Berther
March 16th, 2005

Sujatha,

This control is not designed to open popups, but rather check that the user has not disabled them.

Sumit
March 21st, 2005

I need to disable the pop up blockers without notifying user.
Is this possible through javascipt to open pop up windows of the aplication with Pop Up blockers on.

Matt Berther
March 22nd, 2005

Sumit,

I would imagine that popup blockers would be useless if you could programmatically disable them. As far as I know, there is no way that you can disable a blocker programmatically.

Jacob Ellis
April 13th, 2005

Great Control. Very easy to use, havent found a popup blocker yet where the control wont catch it yet the popup blocker still works.

Suggested Improvement: Public property on the control IsPopupBlocker - will be true if there are active popup blockers, false if there are not. With something like this, I could put the control on my login page, and not let the login function run unless IsPopupBlocker = false.

Matt Berther
April 13th, 2005

Jacob: I’m not sure if I can provide the feature that you’re requesting as the popup test is done on the client side and I would need to somehow force communication with the server.

I’ll look into it though, and keep you posted.

karl maynard
May 2nd, 2005

I havent looked at your source code as yet but I expect that you could make the client side javascript call the .NET’s __doPostback function - giving the popup blocker as the control and then use the controls event handle set a flag that the user could access.

Rob
April 13th, 2006

Great control.

I use popupTester.Visible to determine if the blocker is active or not.
Then put the result in a session. Works fine for me.

Luc
July 25th, 2006

The control is not detecting my browser and third party pop up blockers. detectPopupBlocker() always returns false. I’m using IE 6 with yahoo popup blocker. Any suggestions?

Mike
November 3rd, 2006

I just upgraded to IE 7 and the control keeps firing even though I have pop-ups allowed. It was working great in IE 6. Any ideas?

Idea$
November 22nd, 2006

Thanks.

KUNAL
April 25th, 2007

I need to disable the pop up blockers without notifying user.
Is this possible through javascipt to open pop up windows of the aplication with Pop Up blockers on.

Ajay kohar
May 1st, 2007

I want to disable the pop up blockers without notifying user.
Is this possible.if yes, then can you please provide the code.

Onkar
July 6th, 2007

Its a grt tht pop up blocker get detected at server side.. grt work..
colud you please let me know how to get value TRUE or FALSE from popupTester at server side

michael
June 23rd, 2008

this looks very useful. i just wish there was a little more information on implementing it. i am new to asp.net and i am not quite sure how to use it but would like to learn.
thank you

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
-->

flag
Favorite Charity
wounded warrior project
Search
Social
  • mattberther on twitter
  • mattberther on linkedin
Syndication
Archives
  • June 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • September 2008
  • August 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • December 2004
  • November 2004
  • October 2004
  • September 2004
  • August 2004
  • July 2004
  • June 2004
  • May 2004
  • April 2004
  • March 2004
  • February 2004
  • January 2004
  • December 2003
  • November 2003
  • October 2003
  • September 2003
  • August 2003
  • July 2003
  • June 2003
  • May 2003
  • April 2003
  • March 2003
Jobs
mattberther.com © 2003 - 2009