#3 new
Thadd Selden

Update window title when new notifications are pending

Reported by Thadd Selden | December 1st, 2008 @ 07:37 AM

The title of the window should reflect that there are notifications pending. This will allow users to see new messages by glancing at their tab bar.

Comments and changes to this ticket

  • Thadd Selden

    Thadd Selden December 1st, 2008 @ 03:02 PM

    • Assigned user set to “Thadd Selden”
  • Thadd Selden

    Thadd Selden December 2nd, 2008 @ 10:58 AM

    This isn't quite as easy as it first seems. Changing the title is simple, just say:

    
    document.title = "New title"
    

    The challenge is that you don't have a way to know that the user is not viewing the page at the time unless the user has set their status as away. So, a notification will come in, the title gets updated, but then on the first message update the notification is cleared and the title goes back to normal.

  • Thadd Selden

    Thadd Selden December 2nd, 2008 @ 11:02 AM

    An idea:

    A hidden status field could be set via a function like the following:

    
    window.onblur = function() {jQuery('#window_hidden').html('true');}
    window.onfocus = function() {jQuery('#window_hidden').html('false');}
    

    The notification AJAX response can then check the content of this div to determine whether to change the title.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

AJAX chat with LDAP or OpenID logins and custom notification keywords.

People watching this ticket

Pages