There is a Dreamweaver function that will do this for you (and maybe even a jQuery method), but the native Javascript function is so easy you may as well use it.
If you want to remove browser chrome, you must open a new window (with parameters specified to remove the chrome) instead of trying to remove the chrome from your existing window. This is a security constraint imposed by browsers.
window.open('myPage.html',
The third parameter in the function call are the window features. If at least one is specified, then all the other window features default to false. So, just set the ones you want, to be true.
The most common ones are:
- chrome (browser UI features)
- close (system close command icon and menu item)
- directories (What's New and other buttons)
- fullscreen (no title bar or menus)
- innerHeight, height (content region height)
- innerWidth, width (content region width)
- outerHeight (visible window)
- outerWidth (visible window)
- left (position of the window; specifiy as an integer, pixels)
- top (position of the window; specifiy as an integer, pixels)
- resizable
- status (bar at the bottom)
- titlebar
- toolbar (nav buttons)
Internet Explorer doesn't understand innerHeight and innerWidth, so also specify width and height if you are interested in controlling that.
For best compatibility, do not put spaces after the commas in the third parameter.
Opening a New Page in the Same Window
If you simply want to replace the contents of your existing window, then use the Location object:
location.href = 'dir/myPage.html';