7

I'm working on a browser-based application that needs to be able to get users' attention when the user receives an incoming event, such as a message, even if the user has minimized the browser.

Searching gave me some good results, but nothing cross-browser or firefox-specific. I need to be able to support IE 7+ and FF 3.6+ (specific to the user base).

Here are the things I've looked at:

So far, we used a simple javascript alert to get the tray icon to flash, but that created an extra click in trying to respond to the notification (total of 3 clicks now, or a 33% degradation). Users are expected to do this 20-50 times a day, so it will get really annoying really quickly.

Based on an example provided on Microsoft developers network, I made this simple prototype that worked well for IE, but it's IE-specific and will not work in other browsers:

<HTML>
<HEAD>
<TITLE>Popup Example</TITLE>
<SCRIPT LANGUAGE="JScript">
function timeMsg()
{
    var t=setTimeout("ButtonClick()",5000);
}

var oPopup = window.createPopup();

function ButtonClick()
{
    var oPopBody = oPopup.document.body;
    var myHeight = (window.screen.availHeight - 125);
    var myWidth = (window.screen.availWidth - 350);

    oPopBody.style.backgroundColor = "red";
    oPopBody.style.border = "solid black 1px";
    oPopBody.innerHTML = "Click outside <B>popup</B> to close.";
    oPopup.show(myWidth, myHeight, 300, 75);
}
</SCRIPT>
</HEAD>
<BODY>
<BUTTON onclick="timeMsg()">Display alert in 5 seconds</BUTTON>
</BODY>
</HTML>

Any suggestions on how to make this experience better without using an executable installed locally are greatly appreciated!

Community
  • 1
  • 1
Sologoub
  • 5,312
  • 6
  • 37
  • 65
  • 2
    People hate popups because they contaminated the entire web at one point. All major browsers build in ways to automatically eliminate them. Most anti-virus software also has plugins to eliminate popups. So, the only way to do this is inherently not web-like. – evan Oct 21 '11 at 23:05
  • Thank you, Evan. I definitely share same sentiment from the user perspective. Since the application I'm working on is B2B, we have a bit more flexibility when it comes to dictating settings. So, if there any suggestions that trigger pop-up blockers or other built-in browser security features that can be turned off by the user, that would be acceptable for this purpose. – Sologoub Oct 21 '11 at 23:11

3 Answers3

0

As old as it is: Here is some new stuff might solve the problem in ~> IE9

Use window.extern.msSiteModeSetIconOverlay api call.

Here is a reference

http://www.codeproject.com/Articles/117115/Using-Overlay-Icon-API-to-Make-Client-Notification

Rn2dy
  • 4,112
  • 12
  • 43
  • 59
0

We ended up just going with Google Chrome Desktop Notifications and asking our clients to either user Chrome or Chrome Frame within IE. Notifications are augmented by playing a sound as an alert.

Here's the documentation on it: http://code.google.com/chrome/extensions/notifications.html

Sologoub
  • 5,312
  • 6
  • 37
  • 65
  • 2
    Google plans on killing Chrome Frame as of January 2014. Source: http://google.com/chromeframe – Gili Aug 29 '13 at 20:58
-1

If you can dictate that the users will turn off popup blockers, then have a "setup" page.

That page has instructions on how to turn off popup blockers for you site and their/all browsers. Preferably with images showing what to do. Most browsers give a notice that a popup has been suppressed with a way of adding the site to a "white list".

Then initiate a popup on that page when they click a button or perform some other action. Then they can just follow the instructions and turn off the popup suppression.

evan
  • 12,307
  • 7
  • 37
  • 51
  • Will this work if the browser is minimized? Also, it seems that users would also need to make sure pop-ups don't open as tabs. Is there js code that controls that? – Sologoub Oct 21 '11 at 23:53
  • No, that is all browser specific and a part of the browser itself not the html/javascript rendering. The much much much better approach for something like this is to create an actual application. I've heard good things about cross platform notifications like you are talking about with Adobe Air. I'm sure someone has an answer in a Java app. – evan Oct 22 '11 at 02:32