hi frnd...

i want to remove/disable ADDRESS BAR from the new pop up window...

now i m using this code....its working only for IE6.....

window.open(url ,'title',
'location=1,menubar=no,resizable=no,scrollbars=no,status=no ,toolbar=no,width=300,height=200')

Also i want to remove expand button in browser...plz tell me how can i do it...

Thanks in advance...

Dani AI

Generated

Short answer: you cannot reliably remove or disable the address/location bar in modern Chrome or Firefox from a webpage. The old window.open(..., 'location=no') behavior is legacy; modern browsers treat those window-features as a request only (or ignore them) and many vendors force the location bar for security/anti‑phishing reasons — that is why your IE6 code still worked but similar calls are ignored today. (developer.mozilla.org)

Practical alternatives (safer and reliable): follow and implement an in‑page modal/popup (overlay div) so the user never leaves your site — this gives full visual control without fighting browser UI. If you need a chromeless window for a dedicated device, deliver the site as an installed PWA (display: "standalone" / fullscreen) or use kiosk/app mode or a native wrapper (Electron/CEF) for locked devices; those approaches remove browser chrome only when the app is installed or the device is under your control. (developer.mozilla.org)

Accessibility and implementation notes: an accessible modal must manage keyboard and focus (move focus into the dialog, trap Tab, restore focus on close), and mark it as modal to assistive tech (use role="dialog" / aria-modal="true"). Keep a visible close control and support Escape. Example ARIA skeleton:

<div role="dialog" aria-modal="true" aria-labelledby="dlgTitle">
  <h2 id="dlgTitle">Popup title</h2>
  <!-- interactive content and a close button here -->
</div>

Follow the ARIA guidance when implementing the overlay. (developer.mozilla.org)

Hey.

You only have very limited control over stuff like this, which is how it should be. Your code should not be able to mess up user-chosen browser settings, like the ability to see the menu bar.
Users generally don't appreciate when websites mess up their browser ;-)

Buuut. If there is a way, it would be done using Javascript, not PHP.

If you want to display a popup window, and you want to be able to control how it is displayed, I would recommend trying a CSS solution.
You could put a absolutely positioned <div> on top of your main site, displaying the popup content.

For example:

<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
    <style type="text/css">
        #PopupOverlay {
            display: none;
            position: fixed;
            left: 0px; right: 0px;
            top: 0px; bottom: 0px;
            background-color: #000000;
            opacity:.75;
        }
        #PopupWindow {
            display: none;
            position: absolute;
            width: 350px; height: 150px;
            left: 50%; top: 50%;
            margin: -75px 0 0 -175px;
            border: solid 2px #cccccc;
            background-color: #ffffff;
        }
        #PopupWindow h1 {
            display: block;
            margin: 0;
            padding: 3px 5px;
            background-color: #cccccc;
            text-align: center;
        }
        #PopupWindow p {
            margin: 0px;
            padding: 5px;
            font-size: 90%;
        }
        #PopupWindow a {
            display: block;
            position: absolute;
            top: 50%; left: 50%;
            margin: -70px 0 0 145px;
            width: 25px; height: 25px;
            background-color: #ff3333;
            text-align: center;
            text-decoration: none;
            font-size: 120%;
        }
    </style>
    <script type="text/javascript">
    function OpenPopup() {
        document.getElementById('PopupOverlay').style.display = 'block';
        document.getElementById('PopupWindow').style.display = 'block';
    }
    function ClosePopup() {
        document.getElementById('PopupOverlay').style.display = 'none';
        document.getElementById('PopupWindow').style.display = 'none';
    }
    </script>
</head>
<body>
    <h1>Some thing</h1>
    <p>This is the main content of the site.<br />
        Click <a href="javascript: void(0)" onclick="OpenPopup();">here</a> to show a popup window.
    </p>

    <div id="PopupOverlay"></div>
    <div id="PopupWindow">
        <h1>Popup Window!</h1>
        <p>This is the text inside my popup window!</p>
        <a href="javascript: void(0)" onclick="ClosePopup();">x</a>
    </div>
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.