# Show Popwindow does not work for me

**URL:** <https://discourse.mozilla.org/t/show-popwindow-does-not-work-for-me/4046>\
**Category:** Development\
**Created:** [September 14, 2015, 1:17pm UTC](https://discourse.mozilla.org/t/show-popwindow-does-not-work-for-me/4046 "2015-09-14T13:17:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashish](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@Ashish](https://discourse.mozilla.org/u/Ashish)\
**Post date:** [September 14, 2015, 1:17pm UTC](https://discourse.mozilla.org/t/show-popwindow-does-not-work-for-me/4046/1 "2015-09-14T13:17:05Z")

</div>

Hello,

I am completely new for Add-on development.

I am trying to open the Popup window using button click event.

But I am not able to achieve it.

Below is the code I am trying.

```
var buttons = require('sdk/ui/button/action');

var button = buttons.ActionButton({
  id: "mozilla-link",
  label: "Visit Mozilla",
  icon: {
     "16": "./16x16.png"
  },
  onClick: handleClick
});

function handleClick(state) {
    var { openDialog } = require('sdk/window/utils');
    var window = openDialog({url:'http://www.google.com/'}, {
        name: 'jetpack window',
        features: Object.keys({
            width: 200,
            height: 200,
            resizable: true,
            scrollbars: true
        }).join()
    });
}

```

I am getting following message in Command window

```
JPM [info] Creating a new profile
[GFX1-]: Invalid size in UpdateRenderTarget Size(0,0)

```

Could you please help me with this issue?  
Also let me know any suggestion about opening Popup window with specific size.

Regards  
Ashish

---

<div class="post-metadata">

**Author:** ![azitnay](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@azitnay](https://discourse.mozilla.org/u/azitnay)\
**Post date:** [September 14, 2015, 2:06pm UTC](https://discourse.mozilla.org/t/show-popwindow-does-not-work-for-me/4046/2 "2015-09-14T14:06:46Z")

</div>

You have 2 problems:

1. openDialog() takes a single object as a parameter, not 2 separate objects as you’re passing.

2. your Object.keys({…}).join() call is only including the object’s keys, which means you’re ending up with a features string of “width,height,resizable,scrollbars” (no width and height values).

Try this:

```
var window = openDialog({url:'http://www.google.com/',
    name: 'jetpack window',
    features: 'width=200,height=200,resizable,scrollbars'
});
```

---

<div class="post-metadata">

**Author:** ![Ashish](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@Ashish](https://discourse.mozilla.org/u/Ashish)\
**Post date:** [September 15, 2015, 9:57am UTC](https://discourse.mozilla.org/t/show-popwindow-does-not-work-for-me/4046/3 "2015-09-15T09:57:42Z")

</div>

Thanks Azitnay!!

This worked for me… 😄

Where can I find samples for creating add-on?
