473,379 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

How do you put back the locationbar and menubar from within your own page

Assume that this page
www.externalsite.com/anypage.html
would contain the following javascript:
window.open('www.mysite.com/mypage.html', null, 'location=no,
menubar=no');

Then I would like to do the following:
window.setMenubar(true);
window.setLocation(true);
from within my own page
www.mysite.com/mypage.html

Unfortunately 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 ???

Jul 20 '05 #1
3 2235
<No******************@bahnhofbredband.se> wrote in message
news:qe********************************@4ax.com...
Assume that this page
www.externalsite.com/anypage.html
would contain the following javascript:
window.open('www.mysite.com/mypage.html', null, 'location=no,
menubar=no');

Then I would like to do the following:
window.setMenubar(true);
window.setLocation(true);
from within my own page
www.mysite.com/mypage.html

Unfortunately 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.location)){
opener.location = location.href;
if(window.close)window.close();
}

Richard.
Jul 20 '05 #2
"Richard Cornford" <Ri*****@litotes.demon.co.uk> wrote in message
news:bo*******************@news.demon.co.uk...
<snip>
if((opener)&&(!opener.closed)&&(opener.location)){
opener.location = location.href;
if(window.close)window.close();
}


You might also address the possibility that the 'opener' was a frame
within a frameset by using:-

opener.top.location = location.href;

-instead.

Richard.
Jul 20 '05 #3
No******************@bahnhofbredband.se wrote:
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 ???


Your `?' key is b0rken and whitespace before sentence marks (except
of `-') is a bad idea in Usenet because of automagic line-break.

The Gecko DOM allows for

window.menubar.visible = true;
window.locationbar.visible = true;

I hope for you that you did not ask the opposite of which you want to
achieve, manipulating the working area of your users without asking them.
PointedEars
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
7
by: bigbinc | last post by:
Is there a way to check for the back button? There has got to be a way with either vbscript/javascript. I could place redirect pages in there or some creative? any ideas?
2
by: Todd Lu | last post by:
I am trying to redirect a login page to another page after validating the username and password. I am currently trying to use javascript with the window.open command but this leaves the...
5
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
25
by: KK | last post by:
Hi, I am using history.go(-1) for implementing the back button functionality. Its working fine but with this exception. 1. The page which is having back button has some hyperlinks on it. ...
8
by: Jho | last post by:
Is it wise to do the following to hide html source and other info. I plan to do a popup window which would close my existing web page and popup a window in its place without toolbar and...
1
by: RJDev | last post by:
Hi, Do yoy have any idee on how to manipulate the explorer browser screen. I wont to make my web app so the menubar toobar and statusbar are hidden. The minimize and maximize options need to...
2
by: Microsoft News | last post by:
What I have is a message box that pops up. It is another browser window. The code is a general function that you pass message, title and a key to. The box works great except, that if you are on a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.