We help IT Professionals succeed at work.

How do I open a new window containing no default browser header information and have it replace the window of the calling page.

Is there a way to open a page in a new window with the new window having the default header information (navigation arrows, editable address bar, refresh button, menu, toolbar etc.)
removed and have this new window replace the calling window.


Index.cfm
------------
<script type="text/javascript">
    <!--- If javascript is enabled, then redirect to the actual site --->

    var win = window.open('FirstPageOfApp.cfm', '', 'width=850, height=850, channelmode=no, directories=no, fullscreen=no, location=no, menubar=no, resizable=yes, scrollbars=yes, status=yes, titlebar=no, toolbar=no', 'true');

    win.focus();
</script>

<noscript>
    <!--- Javascript is not enabled so display a message and stop --->

    JavaScript is turned off and/or pop-ups are being blocked in your web browser. Javascript must be turned on and pop-ups must be allowed for this site to run this program.

</noscript>



FirstPageOfApp.cfm
-------------------------
<h1>This is the first page of the app.</h1>


Script Index.cfm (above) calls page FirstPageOfApp.cfm (above) by executing window.open(). A new window opens and page FirstPageOfApp.cfm is displayed in the new window with none of the default header information (navigation arrows, menus, toolbars, etc.) displayed except a read-only address bar.
Page Index.cfm stays open and is just a blank page with the default header information displayed.
The result is that 2 pages are now open; Index.cfm (with the default header information) and FirstPageOfApp.cfm with a read-only address bar.

Is there a way to have Index.cfm call FirstPageOfApp.cfm and have FirstPageOfApp.cfm be the only page open as a result of the call (i.e. FirstPageOfApp.cfm somehow replaces Index.cfm or closes Index.cfm without the "the webpage is trying to close" prompt to the user)?

I am trying to have the result be: page FirstPageOfApp.cfm is the only page displayed and it has only the read-only address bar displayed.

Comment
Watch Question

Top Expert 2013
Commented:
No. Fortunately you cannot close the window without user permission; and that is the way it should be.  
Top Expert 2011
Commented:
Been there.
Tried that.
Alas, browsers intentionally prevent such things and any attempt to get around it, even if you succeed, will eventually break.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.