tags:

views:

57

answers:

1

I would like to do some notification stuff for my website.

I am done with the backend coding but i would like to display properly in the VIEW.

So exactly what i need to do is when ever there is a message i would like my button to change its color.I mean i want to do something which indicates that there is a message waiting for the user.

So basically i need to make my button blinking or change color so that it indicates the user that he has some message waiting for him

So can you please suggest me any button which can have an image as a display and a corresponding css file which i need to use which can blink when ever there is a message.

+2  A: 

Both PushButton and ToggleButton allow setting an image as the face of the button. However, you should be able to make a normal Button "blink" just by using CSS and a Timer. Use addStyleName() and removeStyleName() in combination with the Timer - on new message, add your "blink" style (it's up to you to come up with it ;)), add a Timer and in its run() method removeStyleName() the "blink" style.

PS: See this blog post, to see how the Google team created the cross-browser, customizable buttons in GMail - but that's an overkill in this situation, IMHO ;)

Igor Klimer