Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Menubutton control with dynamic links

1 view
Skip to first unread message

Benjamin Thompson

unread,
Nov 7, 2009, 4:39:56 PM11/7/09
to
I am trying to create an add-on that takes the contents of a textbox
and adds that string into a URL, much the same way OpenSearch does.
I'm having a hard time finding the correct JS code to cause a
menubutton menu item to act as if it were a bookmark menu item: that
is, send the active browser tab to a new URL.

I've attempted using [b]window.open[/b] and [b]window.location[/b], or
nesting those functions within a function of my own. I've tried adding
[b]href[/b] to my menuitem tags, but so far nothing caused any
behavior at all. The menu items appear, and are clickable, but do
nothing.

I suspect it's a scope problem, but I can't find the solution
anywhere. How do I get a menubutton menu item in a toolbar to cause
behavior in an active tab? The samfind extension does this but it
appears to be made out of a binary .jar file rather than the .js
and .xul formats I'm working with.

Does anyone know what I'm missing?

Benjamin Thompson

unread,
Nov 9, 2009, 8:08:40 AM11/9/09
to
Problem solved. Someone pointed out gBrowser.

This community is very helpful but I hope the documentation gets a
little more cohesion. Information seems spread across two different
sectors of the Mozilla site which do not link to each other very much.

0 new messages