1

What is the easiest or smartest way to create a popup notification from a browser? I am trying to code a browser chat application and I need the application to be able to reliably notify the user when a message arrives. This notification has to be as visible (and audible?) as a Skype incoming message would be. It doesn't matter how exactly the notification is shown, but it should be VISIBLE. Meaning taskbar flashing, traytip flashing, small window in the corner on TOP layer of desktop... Anything as long as it's always (or almost always) notable even the browser is minimized. And this has to work on both OSX and Windows.

This chat application should work on OSX/Windows but can be browser-dependent if necessary (can work only in Firefox for example). Also it's best if no plugins are necessary, but plugins is also a possibility if that's the smartest way to go.

distill
  • 61
  • 1
  • 3

2 Answers2

0

I was messing with this a while back. I changed the document.title repeatedly to give an animated effect in the taskbar button. cancelling the animation when the window regained focus.

There were some issues with IE (naturally) and Opera, see my question here for the messy details:

window.onfocus not firing in IE7, inconsistent in Opera

I don't know what that would do on a Mac, though; it might be a good place to start from, at least.

Community
  • 1
  • 1
Ed Daniel
  • 522
  • 11
  • 22
  • Thank you very much, but I don't think that would work in OSX. The dock is just a bunch of icons, there is no text that could change. OSX support would be as important as Windows support. – distill Feb 10 '12 at 18:02
0

I had a deeper look, and an answer in this question points to the Firefox window.getAttention. The documentation states that it is "disabled for web content", so it looks like you'd have to write your application as a Firefox extension, rather than as a web page. But it does claim to work in Windows, Linux, and Mac. So if you're in a position to insist on a given browser and make people install add-ons (an internal company application?), it might do the job. I'm afraid that's the best I can come up with.

Several people have suggested an alert() as a kludge, and that was indeed my next thought. But I just tested that here (FF9, Windows 7) and it doesn't do anything to my taskbar.

Community
  • 1
  • 1
Ed Daniel
  • 522
  • 11
  • 22