views:

202

answers:

1

Hi all,

I'm creating a firefox add-on, and I have a situation where if someone clicks on a specific item in my toolbarbutton menupopup, I want to display some text to appear beside the mouse for a couple seconds. I don't mean mouseover text, because when they click on the item, the I close the menupopup. I mean something like what's shown at this site:

http://www.kingsquare.nl/cursormessage

The normal way of doing this would be with javascript and a div that would have the text I want to show. Unfortunately, I've discovered that the toolbarbutton can't have an effect on the main window, which is where I'd need to place the div to show. I've tried getting JQuery to work and haven't been successful either.

Any help would be greatly appreciated.

Thanks!

A: 

You can use panels together with openPopup() and hidePopup(). Remember to set the attribute noautohide to true on the panel.

More info on panels : https://developer.mozilla.org/en/XUL/panel

lithorus