views:

268

answers:

2

Hi,

I'm having issues setting the size of a popup and disabling the location bar in Google Chrome. I'm using the following:

window.open( "site.html", "site", "top=50,left=50,width=20,height=50,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no" );

Chrome doesn't resize the window to the specified height and width, and also the location bar is still visible. Firefox resizes the window to the appropriate height/width, but also shows the location bar.

Is there something wrong with the code that i'm using in order to make a new popup window with a fixed width/height that has the location bar, menu bar, scroll bar, status bars disabled?

A: 

You can't always force a user's browser windows to leave off stuff you don't want to be there. Firefox, for example, provides options to allow a user to refuse requests to disable any of the components of a window created by "window.open."

Now, as to the size, browsers impose minimums, and I suspect that that's what's getting you.

Pointy
minimums just in terms of the window.open()? it seems hackish, but is it possible that i could just use window.open() to the browser minium, and then resize it programmatically after it's loaded?
minimalpop
Well I don't know for sure; you could certainly try that. It should be pretty easy to put together a very simple test program so that you can do it in different browsers.
Pointy
A: 

You should instead use Floating Dialogs using Javascript.

http://jquery.com/demo/thickbox/

JeremySpouken
unfortunately, this project requires popups (with refined control).
minimalpop