Javascript – How to remove the address bar from a popup window

javascriptpopuppopupwindow

onClick="window.open('index.php?option=com_virtuemart&page=shop.cart&product_id=<?php echo $product_id?
>&Itemid=18','mywindow','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=350')"

Best Answer

Internet Explorer will always show the address bar, it isn't possible to remove it on a popup. Some browsers will hide the address bar with the location=no flag, but IE doesn't.

From MSDN:

In Internet Explorer 7 and later, you cannot remove the address bar in Internet Zone windows, for security (anti-spoofing) reasons.

Popups should be avoided anyway, many visitors will have popup blocking software or the browser will simply block it. It would be better to consider something like a <div> overlay on the page which you could code manually, or use a ready made plugin such as jQuery UI Dialog or Lightbox.