This is not exactly your approach, but you may disable the navigation panel of any window using plain javascript. Just set window.menubar
and window.toolbar
visibility to false
as follows,
window.menubar.visible = false ;
window.toolbar.visible = false ;
Update:
Changing the menubar and toolbar visibility of an existing window seems to violate security protocols. (https://developer.mozilla.org/en/DOM/window.menubar)
Therefore the only real way is to open a new window with menubar and toolbar set to "no" in the first place:
window.open(url,name,"menubar=no,toolbar=no[, additional options]",true) ;
If you set the replace argument (the last argument) to true the new window should also inherit the history of the window it was opened in.
Check https://developer.mozilla.org/en/DOM/window.open and http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx for reference.