Arun
Arun

Reputation: 1704

hiding address bar from a pop-up window

i am developing a website, as my website contain different products.. when a user click in any one the product from my list, the product details opens and is shown in another pop-up window.but that pop-up window opens with address bar that contains my product link. Can anyone please help me to hide that pop-up window address bar and if possible status bar also from that pop-up window.

thanks in advance

my javascript:

window.open('sample.aspx?ProdName=" + productname +  "','','height=600,width=930,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,modal=yes')");

Upvotes: 2

Views: 4642

Answers (3)

Chad
Chad

Reputation: 19619

You cant hide the address bar, but you can hide the status bar and toolbar and other things. Here is a good description of the parameters to the window.open() method.

window.open("http://www.my-domain.com", "My Title","status=0,toolbar=0");

In repsonse to comment:

window.open("sample.aspx?ProdName=" + productname, "height=600,width=930,status=0,toolbar=0,menubar=0,location=0,scrollbars=1,modal=1");

Upvotes: 2

Richard Ev
Richard Ev

Reputation: 54167

Have you considered showing an in-browser dialog, using JavaScript such as jQuery dialog?

Upvotes: 1

Quentin
Quentin

Reputation: 944556

You can't. Modern browsers prevent popups from concealing the domain of the page they are showing by not providing a mechanism for hiding the address bar.

I'd recommend changing the design to avoid popups (which are a horrible piece of UX).

Upvotes: 1

Related Questions