Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE hide toolbar, address bar and menu bar when html page is loaded.

Status
Not open for further replies.

grofaty

IS-IT--Management
Jan 16, 2003
370
0
0
SI
Hi,

Is there a posibility to hide a Toolbar, Address bar and Menu bar in IE when html page is displayed? I don't know somehow with java script or any other solution?

I would like to hide this three options because I would like to show as many text as posible on web page.

Thanks,
Grofaty
 
To do it through a javascript pop up simply add

<script>
function makeNewWindow() {newwindow = window.open("file.htm","","height=800,width=600")}
</script>

within your pages <head> section (where file is the name of the page you want displayed).

and append the <body> tag with <body onload="makeNewWindow()">

This will popup a new window with no toolbars or scroll bars. You can play with the dimensions of the height and width values to maximise your space. Remember to zero of the margins and padding.
 
SimonDavies,
this could be solution if Pop-up blocker shouln't block the contents.

Is there any solution that pop-up blocker will not restrict execution?

SjrH, new window is not good because there are pop-up blockers that prevents view-ing.

Thanks,
Grofaty
 
popup blockers should only block automatic popups, or the ones that appear when you dont want them to, if you click a link then it should allow it, if not, just click: 'Allow Popups'. :)

Best Regards
Rob Kelsey

two_hundred_shot_nitros_oxide@hotmail.co.uk
 
Hi,
the above script is not so good. It should display the Windows taskbar.
Thanks,
Grofaty
 
hang on a second I will see if i can make you a JavaScript specific for what you want.

Tell me what you want to be displayed in the window: e.g. a taskbar, statusbar, scroll bars etc.

Best Regards
Rob Kelsey

My computer makes me say: "Somebody stop the world, I want to get off!
 
Hi,
from top down (yes = display; no = not display):

IE Title bar (min, max, close buttons): yes
IE Menu bar: no
IE Toolbar: no
IE Address bar: no
IE Status bar: no
Windows taskabar: yes

Thanks,
Grofaty
 
Code:
<script>
<!--
function winopen(){
var targeturl="index.php"
newwin=window.open("","","","taskbar")
if (document.all){
newwin.moveTo(0,0)
newwin.resizeTo(screen.width,screen.height)
}
newwin.location=targeturl
}
//-->
</script>
<a href="#" title="Click Here etc (opens in a new window)." onClick="winopen()">Click Here</a>

that should work, otherwise try tweaking it abit, and dont forget to change the:

Code:
var targeturl="index.php"

to whatever you want it to be.

-----
Best Regards
Rob Kelsey
_________________________________________________________________
My computer makes me say: "Somebody stop the world, I want to get off!
 
no that wont work, because you need to specify what you want it to open with better:

Code:
<script>
<!--
function winopen(){
var targeturl="index.php"
newwin=window.open("url=0","scrollbars=0","status=0","taskbar=1","toolbar=0")
if (document.all){
newwin.moveTo(0,0)
newwin.resizeTo(screen.width,screen.height)
}
newwin.location=targeturl
}
//-->
</script>
<a href="#" title="Click Here etc (opens in a new window)." onClick="winopen()">Click Here</a>

that i am almost certain it will work

-----
Best Regards
Rob Kelsey

_________________________________________________________________
My computer makes me say: "Somebody stop the world, I want to get off!
 
agh, just tried it, it dosn't work at all now.

erm...try
maybe they will have something you can use.

-----
Best Regards
Rob Kelsey
_________________________________________________________________
My computer makes me say: "Somebody stop the world, I want to get off!
 
Hi,
teoretical question: if I make it work this javascript, will IE display worning about blocking contents?

Thanks,
Grofaty
 
no, i find it only does that if you preview sites locally

-----
Best Regards
Rob Kelsey
_________________________________________________________________
My computer makes me say: "Somebody stop the world, I want to get off!
 
Hi,
is this solution with javascript browser independent? Will it work in FireFox also?
Thanks,
Grofaty
 
Hi,

I opened a new window, but how to maximize it? So I only need maximize!

Index.html file:
Code:
<HTML>
<BODY>
<A HREF="javascript:void(0)" onclick="window.open('welcome.html','welcome','width=300,height=300')">Opens a new window</A>
</BODY>
</HTML>

Welcome.html file:
Code:
<html>
<body>
Hello world!
</body>	
</html>
 
maybe take out the width and height params?

-----
Best Regards
Rob Kelsey
_________________________________________________________________
My computer makes me say: "Somebody stop the world, I want to get off!
 
Hi,
removing the weight and height parameter it opens up a normal IE window.
I have enlarge the parameters and set them to 'weight=480 height=680'. It is not the best solution but for now.

One more question:
How to open a new html page in the same browser not in the new one (or how to close down the first windows automaticaly).

Thanks,
Grofaty
 
open in the same window:

Code:
<a href="yourlink.html" target="_self">opens in same window</a>

to close the last window after a timeout:

Code:
<meta http-equiv="refresh" content="5;URL=JavaScript:window.close();">

the '5' after content= is the delay.

-----
Best Regards
Rob Kelsey
_________________________________________________________________
My computer makes me say: "Somebody stop the world, I want to get off!
 
Rob,
"meta http..." sample does not work.
"a href..." sample works but is not compatible with my above sample.

Any tip?

Thanks
 
maybe thats not the right script to close windows but its something like that, or even better have an onClick handler

Code:
<a href="yourlink.html" target="_blank" onClick="JavaScript:window.close();">Click Here</a>

failing that close script maybe:

Code:
<a href="yourlink.html" target="_blank" onClick="JavaScript:closeit();">Click Here</a>

i will check up the JS to close windows, since i have it on one of my sites.

-----
Best Regards
Rob Kelsey
_________________________________________________________________
My computer makes me say: "Somebody stop the world, I want to get off!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top