Forum Moderators: open

Message Too Old, No Replies

To remove address, link and status bar from a browser

         

harsha

12:09 am on Jun 2, 2002 (gmt 0)



is it possible (with the help of a java code) to create a page in which I don;t have the address, link and status bars ?
If so could somebody please tell me how to do so ?

papabaer

2:12 am on Jun 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello harsha,
Welcome to WebmasterWorld!

If you want to create a page that opens in a chromeless window, when a link is clicked from the "launch page" it just requires some simple javascript. You can control the size of the new window by adjusting the width and height values.

Test this out yourself by copying the following two example pages. The first is the actual "popup" - be sure to save the page as "pop.htm" since that is the name of the "url" referenced in the "launch" page.

/* copy popup window page code below */

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- WebmasterWorld.com -->
<title>
Simple Chromeless Popup
</title>
</head>
<body>
<p>
This is a test<br />
[b]<a href="javascript:self.close()">Close this window</a>[/b]
</p>
</body>
</html>

Then copy and paste the following, you can name the file "poptest.htm" or what ever you choose.
/* copy launch page code below */

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>
Simple Popup Chromeless Window
</title>
</head>
<body>
[b]<script type="text/javascript">
function openpopup(){
var popurl="pop.htm"
winpops=window.open(popurl,"","width=300,height=330,scrollbars,")
}
</script>[/b]
<p>
[b]<a href="javascript:openpopup()">CLICK HERE</a>[/b]
</p>
</body>
</html>

Then launch "poptest.htm" (or whatever you named the test page) and click on the link. The new window will launch and load "pop.htm" - I've included the "close window script" which is something you should always consider when launching "chromeless" browser windows.

Try doing a search for "chromeless windows" to learn more.

harsha

4:40 am on Jun 2, 2002 (gmt 0)



Thanks Papabaer for your answer.
I had your option of chromeless windows in mind already, but I wanted to know if it was possible for me to change the configuration of the current page, and not that of a new pop up window.. but I guess such an option does'nt exist, I think I will now go in for a chromeless window.

Nick_W

6:01 am on Jun 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Harsha,

What is this all for? Possibly another solution would present itself if you told a little more?

Nick

harsha

7:16 am on Jun 2, 2002 (gmt 0)



Hey Nick_W.. what I'm trying to do is basically set up my home page.. I'm kinda new to HTML/JAVA scripting.
What I'm trying to do is to get code a page in such a way that I would be able to get rid of the address/link bar etc...
I know that I can do this using chromeless windows, but that would require me to use a pop-up window.
But what I'm looking to do is to achieve this without creating a pop-up window, so I wanted to know if this was possible

Thanks,
-Harsha

Nick_W

7:45 am on Jun 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Got it.

But why do you need to do this?

Nick

PsychoTekk

8:11 am on Jun 2, 2002 (gmt 0)

10+ Year Member



well i know how to show/hide the gogle toolbar, i'm sure there is
some code for the other browserbars, too
(works for msie only)

put this into the head or body of your html document:

<object id="WebBrowser1" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" width="0"></object>

and call it via javascript:
WebBrowser1.ShowBrowserBar("{2318C2B1-4965-11d4-9B18-009027A5CD4F}", false);

(2318C2B1-4965-11d4-9B18-009027A5CD4F is the identifier for the googlebar)

tedster

4:14 pm on Jun 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's a thought.

If you use window.close in a window that your javascript did not open, you get an alert asking for user consent before that script will execute. So I assume that any other changes to basic browser features in a window you didn't open, even if/where possible, would also require user consent.

Yes, there might be a script-kiddie hack. But we're talking about legitimate code, not an exploit that gets around intended security.

Bottom line for me - if I opened the window, I want it to reflect my preferences, and I don't want any website to override me.

If a website wants that kind of control - they should open their own window. And if I don't like what they do, well, I'm an Opera user. I can open a full featured "duplicate" window with a right click.

PsychoTekk

4:44 pm on Jun 2, 2002 (gmt 0)

10+ Year Member



tedster, you might got it wrong:
i'm not talking about any kind of script hacks, no exploits,
just javascript.
i don't think it's about to modify another website's window,
i thought of it as your own website:
by default the browser opens a website with all the bars the
user has set as default.
now there might be a website that i want to be shown without
these bars but i don't want to open a new window because that might
look unprofessional / like popups, so i let my website
modify its own window.

btw, it's never difficult to override a website's setting, and
i prefer control over my browser, too ;)

papabaer

5:12 pm on Jun 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If a designer feels the need for a "chromeless" window presentation, it should ALWAYS be done with the end-user in mind. Don't wrest away a user's browser controls without announcing that the link they are about to click will launch a new "popup" window. And yes, do inform your visitors in advance. This respects their choice to continue on, or to go elsewhere.

Subjecting your visitors to a site that removes their browser controls is both unsettling and rude. In most cases, it is only thought "cool" by the designer. Leave the browser alone... work on the content "inside the chrome." Thats what it is all about anyway. ;)