SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2010
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How I can change color of taskbar in minized window during chat

    Code:
    blinkOnNewMessage: function(dateObject, userID, userName, userRole, messageID, messageText, channelID, ip) {
    		if(this.settings['blink'] && this.lastID && !this.channelSwitch && userID != this.userID) {
    			clearInterval(this.blinkInterval);
    			this.blinkInterval = setInterval(
    				'ajaxChat.blinkUpdate(\''+this.addSlashes(this.decodeSpecialChars(userName))+'\')',
    				this.settings['blinkInterval']
    			);
    		}
    	},
    	
    	blinkUpdate: function(blinkStr) {
    	
    		if(!this.originalDocumentTitle) {
    			this.originalDocumentTitle = document.title;
    		}
    		if(!arguments.callee.blink) {
    			document.title = '[@ ] '+blinkStr+' - '+this.originalDocumentTitle;
    			arguments.callee.blink = 1;
    		} else if(arguments.callee.blink > this.settings['blinkIntervalNumber']) {
    			clearInterval(this.blinkInterval);
    			document.title = this.originalDocumentTitle;
    			arguments.callee.blink = 0;
    		} else {
    			if(arguments.callee.blink % 2 != 0) {
    				document.title = '[**** ] '+blinkStr+' - '+this.originalDocumentTitle;
    			} else {
    				document.title = '[ New message!!!] '+blinkStr+' - '+this.originalDocumentTitle;
    			}
    			arguments.callee.blink++;
    		}
    	},

    Hi friends, I want to flash taskbar when user minimized window during chat.
    I have above code which simply change the title name but i want to change the color also of taskbar.
    How I can do it??
    Please help???
    Thanks in advance.....

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,197
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    I don't believe any browser allows you to control the taskbar apart from IE9 but its control is still very minimal

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    You can show an alert message, which will cause the task bar indicator to flash.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2010
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    You can show an alert message, which will cause the task bar indicator to flash.
    But paul, How????
    Explain and modify in given code.....
    Please
    Thanks in advance

  5. #5
    SitePoint Enthusiast
    Join Date
    Nov 2010
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and yes one more thing...
    If i put alert box then it flash properly but in this way user has to close this alert box again and again with every message appears
    Only thing what i want now that automatically close the alert box as soon as it appears...
    That's it..
    Can anyone tell me how i can do this?????

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by ankit.pandeyc012 View Post
    and yes one more thing...
    If i put alert box then it flash properly but in this way user has to close this alert box again and again with every message appears
    Only thing what i want now that automatically close the alert box as soon as it appears...
    That's it..
    Can anyone tell me how i can do this?????
    Nope, that can't be done. You can make the web browser taskbar icon flash, but only by showing a message window of that nature.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  7. #7
    SitePoint Enthusiast
    Join Date
    Nov 2010
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    Nope, that can't be done. You can make the web browser taskbar icon flash, but only by showing a message window of that nature.
    ok but i want alert() only when window is not active but it gives alert always.
    I try to use window.focus() and window.blur() to check whether window is minimize or not but I couldn't.
    Please help me whether is it possible to check window is minimize or not and how???

  8. #8
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by ankit.pandeyc012 View Post
    ok but i want alert() only when window is not active but it gives alert always.
    I try to use window.focus() and window.blur() to check whether window is minimize or not but I couldn't.
    Please help me whether is it possible to check window is minimize or not and how???
    I don't think that it's possible to determine whether a window is minimized or not.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •