2

I'm working on a PDF generation process that might take a few minutes. I'd like to flash the window and maybe change the title as well when the process finishes so it draws the user's attention back to the window when the process is complete.

Is this simple to do? I've seen code snipplets to change the title, so I supposed I'm looking more for a solution on how to flash the window/tab's color.

Ben
  • 60,438
  • 111
  • 314
  • 488
  • Is this specific to a certain browser or does it need to work for all? I suspect different browsers will act differently in this respect. – James Montagne Jul 19 '11 at 20:16
  • Afaik you don't have control over this.... do something like Google and change the title every few seconds and make a sound... – Felix Kling Jul 19 '11 at 20:16
  • 1
    This has been answered in various ways already: http://stackoverflow.com/questions/37122/make-browser-window-blink-in-task-bar – theoretical Jul 19 '11 at 20:33

3 Answers3

3

It's potentially obnoxious and disruptive, but you can simply call an alert() in the window, which will return focus to the tab in most browsers. Google Calendar does this with notifications and it annoys me like crazy whenever I have a meeting and am working in another tab.

alert("your PDF's ready!");

UPDATE After a couple of tests, Chrome, Safari, & Firefox abruptly focus the tab to show the alert, and IE8 flashes the tab but doesn't focus to it.

Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390
1

You can't flash the Window.

However, changing the title in a loop (so that it animates) would certainly be possible, as long as they still have the browser open or the tab minimized.

Michael Stum
  • 177,530
  • 117
  • 400
  • 535
0

See my answer here using Notifications to draw a users attention and navigate them back to a parent tab with a click.

ScottyG
  • 3,204
  • 3
  • 32
  • 42