<No************ ******@bahnhofb redband.se> wrote in message
news:qe******** *************** *********@4ax.c om...
Assume that this page
www.externalsite.com/anypage.html
would contain the following javascript:
window.open('w ww.mysite.com/mypage.html', null, 'location=no,
menubar=no') ;
Then I would like to do the following:
window.setMenu bar(true);
window.setLoca tion(true);
from within my own page
www.mysite.com/mypage.html
Unfortunatel y these methods (setMenubar and setLocation) do not
exist, but is it possible to achieve the same things as these
methods would do (put back the menubar and locationbar) when
someone else has removed them ???
The chrome of an existing window cannot be altered at all in most
browsers and in the few in which it can be done that action is
restricted so that it is only possible under special security
conditions.
However, if you wanted to discourage people form opening your site in
new windows you could include a script that transferred your page into
an 'opener' window (which probably would have menu and location bars),
possibly closing the chromeless pop-up along the way.
if((opener)&&(! opener.closed)& &(opener.locati on)){
opener.location = location.href;
if(window.close )window.close() ;
}
Richard.