Nate Weiner

  • Archive
  • RSS

Replace Standard Menupop in XUL

I came across a time I needed to open a different element then a standard popup menu when clicking the dropdown selector on a toolbar button. I wanted to open a panel instead. To open a different element and hide the popup you can do something similar to this:

<toolbarbutton type=”menu-button”> <menupopup onpopupshowing=”OpenOtherFunction();event.stopPropagation();return false;” /> </toolbarbutton>
Update: You can do this much more efficiently using XBL Bindings.  I highly recommend reading up on them. Where I learned it: While working on the Read It Later Firefox Extension
    • #extensions
    • #firefox
    • #javascript
    • #xul
  • 3 years ago
  • Permalink
  • Share
    Tweet
← Previous • Next →

About

Prototyper, water waster, developer of Read It Later.

 

Follow

Twitter: @NateWeiner
Vimeo: Nate Weiner
500px: Nate Weiner
Blog: RSS

Pages

  • Contact
  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr