Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7827177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:44:53+00:00 2026-06-02T09:44:53+00:00

I have a Google Chrome extension that opens a Twitter Bootstrap dialog (using JQuery

  • 0

I have a Google Chrome extension that opens a Twitter Bootstrap dialog (using JQuery 1.7.x, but not JQueryUI) from a context menu item click, and I’ve been trying to do the same thing in the Firefox version (using Add-on SDK 1.6), to no avail.

I can intercept the menu item clicks OK in my lib/main.js, using context-menu, but I can’t get a message to the content script (see https://stackoverflow.com/a/8493844/954442) which contains the function that creates the dialog DOM and that displays it. Nor can I create the dialog from my add-on script because there’s no DOM there (and attempting to load JQuery into that via @mozilla.org/moz/jssubscript-loader;1 fails with “window is not defined”)

I’ve looked far and wide for examples, but haven’t found much that helps. Has anyone got an example of a context-menu Item click opening a dialog?

(What are the advantages/disadvantages of using the Add-on SDK to develop my Firefox extension? is the nearest thing I’ve found to my issue. I get the impression the poster found an answer eventually, but didn’t update the question to say what it was.)

(NB. I’m not prepared to consider XUL, and very reluctant to go back to JQueryUI)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T09:44:59+00:00Added an answer on June 2, 2026 at 9:44 am

    Ok, so I believe you want to do something like that:

    https://builder.addons.mozilla.org/addon/1049738/latest/

    Basically you add a contentScriptFile property to your context-menu’s Item. A content script doesn’t share the js variable with the page, however can access to the DOM. So you can add your panel and display it when the context-menu item is clicked.

    Notice that you can pass to contentScriptFile multiple files using an Array, so you can load jQuery as well in this way.

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written an extension in Google Chrome that opens a tab to a
I have created a simple Google chrome extension that overrides CSS classes using the
While creating a Google Chrome extension, I have code that must remain in a
I have begun using Google Chrome as a primary browser, but I miss my
I have a Google Chrome extension that upon pressing a button executes an xmlhttp
I want to write a Google Chrome Extension that can take information from a
I currently looking to build a Google Chrome Extension that fetches bookmarks from the
This is not just for Google Chrome extension but also for JavaScript I am
I am making a Google Chrome extension and I would like to have my
At the moment I am developing a Google Chrome Extension in which I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.