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 8609217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:49:44+00:00 2026-06-12T03:49:44+00:00

I am using Erik Vold’s toolbar button. I have a panel anchored to it.

  • 0

I am using Erik Vold’s toolbar button. I have a panel anchored to it. When one of the links is clicked on the html static page rendered in the panel, I need to display something else in the same panel.

I am trying to use port API for message passing between addon-code and the html static page. On listening a certain event, I want to change the contentURL field of the panel:

var myScript = "window.addEventListener('click', function(event) {" +
           "  var t = event.target;" +
           "  if (t.nodeName == 'A')" +
           "    self.port.emit('click-link', t.id);" +
           "}, false);"

var mainPanel = require("panel").Panel({
  width: 200,
  height: 200,
  contentURL: require("self").data.url("appList.html"),
  contentScript: myScript
});

mainPanel.port.on("click-link", function(appName) {
  if(appName=='app1'){
  //mainPanel.resize(700,500);  --works
    mainPanel.contentURL="http://www.some-server/app1.html";  --fails
  }
  if(appName=='app2')
    ...
});

mainPanel.resize() works fine for resizing the panel. Is there a similar way to change contentURL for a Panel?

  • 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-12T03:49:46+00:00Added an answer on June 12, 2026 at 3:49 am

    That code should work, you found a bug in the panel module. yay!

    I filed bug 795490 for you and there’s a pull request with a fix that might take a little time to land but a fix should be coming.

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

Sidebar

Related Questions

Using RestKit 0.10.1, I have objects served similar to this json format: {objects: [
Using mercurial, I've run into an odd problem where a line from one committer
Using MVC2 I have an AJAX form which is posting to a bound model.
Using WebViewBrush I can render web page content (it's screen shot) to e.g. Rectangle
Using Java,I have to fetch multiple sets of values from an XML file to
Using MVVM. I have a DataTemplate which I am using to display an expander
using chrome and ff so far have made a nasty glitch when using scrollTo
Hi all I have a problem with accessing an HashMap into my jsl using
Using android 2.3.3, I have a background Service which has a socket connection. There's
What I am doing is creating a simple html page in which there is

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.