views:

143

answers:

2

Hi!

I would like to implement a notification mechanism in a firefox extension equal to firefox's "save password" option or popup blocking warning with the yellow bar sliding in above the main window.

Does anybody now how this can be achieved in XUL?

Thanks for any help.

+4  A: 

You'll want to use the notifcationbox element for this.

sdwilsh
That's exactly what I was searching for. Thanks a lot.
Peter
A: 

Thanks to the hint of sdwilsh, a wrote the following code to achive my goal:

var notificationBox = gBrowser.getNotificationBox(); notificationBox.appendNotification("This is my message", "popup-blocked", "chrome://browser/skin/Info.png", notificationBox.PRIORITY_WARNING_MEDIUM);

Peter
You should accept sdwilsh's answer, since it answers your question perfectly.
Nickolay