0

I am building order dashboard for client, is there any way that when client browser window is minimized or tab is not active, I want to show tab tab active and maximized if its already minimized.

Ajax call run after 30 seconds and check for new orders, if new order fetched, I want to do the above actions. help me if there is any quick solution using javascript. Thanks in advance.

Zaib Khan
  • 470
  • 4
  • 7
  • have you seen this? https://stackoverflow.com/questions/37122/make-browser-window-blink-in-task-bar – WraithNath Jan 11 '18 at 13:23
  • 1
    You can't control browser app within OS from within a page window. Think about it a bit. Would you want websites you visit to start moving and resizing apps on your screen at will? Or keep jumping from tab to tab within browser? Take a look at Notifications API – charlietfl Jan 11 '18 at 13:27
  • I don't understand what you mean by "I want to show tab tab active and maximized if its already minimized". If you want to notify a user that something has happened even while the page is minimized, consider using the [Notification API](https://developer.mozilla.org/en-US/docs/Web/API/notification). – zero298 Jan 11 '18 at 13:58

1 Answers1

0

In javascript, just use window.focus();

LStarky
  • 2,740
  • 1
  • 17
  • 47