0

I have a problem calling crossrider setPopup multiple times based on some condition like if user is logged in then only show the Popup on browser action click otherwise show a login popup.

But, it is calling only once after that.

  function handler(evtXHR) {
    if (invocation.ready State == 4) {
        if (invocation.status == 200) {
            //alert("successs : "+invocation.responseText);
            if (invocation.responseText == "demo") {
                //buttonState = true;`enter code here`
                appAPI.browserAction.setPopup({
                    resourcePath: 'html/New popup.html',
                    height: 1000,
                    width: 1000
    });
 }
enb081
  • 3,831
  • 11
  • 43
  • 66
  • I'm a Crossrider employee and would be happy to help you. However, there isn't enough information here to answer your question. If you could provide the following information, I am happy to investigate the issue: (1) The extension id (2) Which browser and os are you testing on? (3) The location of the code (file/line no). Thanks – Shlomo May 06 '13 at 19:15
  • my extension id is 30403 and i am testing on firefox 20.0.1 code is in background.js – AbhishekSharma May 07 '13 at 04:10

1 Answers1

1

In general, calling setPopup more than once changes the content for the subsequent button click. However, having reviewed your code, I can see that there are several issues with the extension, for example, for correct operation the button must be enabled in the Settings > Browser Buttons (see introduction to browserAction and How to add a button to your extension).

I don't think StackOverflow is the appropriate forum to assist you in debugging the extension issues and therefore, invite you to email our support channel (support@crossrider.com) with the details you provided and I will be happy to assist you further

Shlomo
  • 3,763
  • 11
  • 16