473,785 Members | 3,032 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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('ww w.mysite.com/mypage.html', null, 'location=no,
menubar=no');

Then I would like to do the following:
window.setMenub ar(true);
window.setLocat ion(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 2268
<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.
Jul 20 '05 #2
"Richard Cornford" <Ri*****@litote s.demon.co.uk> wrote in message
news:bo******** ***********@new s.demon.co.uk.. .
<snip>
if((opener)&&(! opener.closed)& &(opener.locati on)){
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.loca tion = location.href;

-instead.

Richard.
Jul 20 '05 #3
No************* *****@bahnhofbr edband.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.location bar.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
6629
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
7
4944
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
1724
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 window.opener to stay open. is there a good way to redirect to a new form in .net 2003 without having the menubar present and the parent form to close? Thanks, Todd
5
7545
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 IE. I link within a page and display individual divisions of that page, manipulating their visibility and display styles with an onClick function. As long as I explicitly click a link to progress, it works with browsers I've tried.
25
7594
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. 2. When anybody click on those links, it will open a new windown.
8
2874
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 menubar. are there any disadvantages of hiding browser toolbar and menubar ?
1
1319
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 be available. All off this from within the codebehind page. Regards. RJ
2
3290
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 page, get the message box, then click ok on the message box go to another page and then back to the first page. The message box pops up again. It is almost like the history or cache still has information about the state and that it knows that...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10151
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3647
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.