HTML to load page with no toolbar etc?

liunx

Guest
Hi,<br />
I am trying to figure out how to specify a page on my website to load when someone clicks a link. I want it to load with no toolbar, and no scroll bar etc, so for examply, if someone is using IE, the only thing they would see besides my info is their top blue IE title bar, no scroll bars, no menus or favorites etc. <br />
<br />
What html could I use to make that happen?<br />
Here is what I tried:<br />
<SCRIPT language=JavaScript><br />
function setSize() {<br />
window.resizeTo(320,320);<br />
strWin=window.open(scrollbars=no, toolbar=no');<br />
}<br />
</SCRIPT><br />
<br />
It gives me an error saying that the word "no" is undefined.<br />
<br />
Any help would be appreciated.<br />
<br />
Thanks!<br />
Steve<!--content-->The correct syntax would be this:<br />
<br />
window.open('yourpage.htm','winname','height=320,width=320');<br />
The default is with everything off, so you don't need to turn them off.<!--content-->Pyro, thanks for the reply. I tried using your suggestion but it didn't work. When I put this code into the page I want to open with no scroll bar and toolbars etc, it now opens up in 2 different windows, 1 full size and 1 320x320 and the smaller window starts blinking at me like crazy. I am guessing that I put your code in wrong? Could you look at what I put in below and see if I have the wrong syntax?<br />
<br />
Thanks!<br />
<br />
<br />
<SCRIPT language=JavaScript><br />
function setSize() {<br />
<br />
window.open'http://www.mypage.htm','winname',<br />
'height=320,width=320');<br />
<br />
}<br />
</SCRIPT><!--content-->Try:<br />
<br />
<script language="javascript" type="text/javascript"> <br />
function setSize() {<br />
window.open('http://www.mypage.htm','winname','height=320,width=320'); <br />
}<br />
</SCRIPT><br />
<br />
You forgot your opening (<!--content-->The code Pyro posted is corect.<br />
First of all you are missing a bracket<br />
window.open'http://www.mypage.htm','winname',<br />
'height=320,width=320');<br />
<br />
it should be <br />
<br />
window.open('http://www.mypage.htm','winname',<br />
'height=320,width=320');<br />
<br />
But that could be a typo,<br />
For your error my guess is that you are calling setSize() method from a anchor tag...if you are then you need to make sure that default behaviour does not get activated..if you have a target attribute delete it.<br />
If you are calling setSize from onclick event then make sure href attribute has this value<br />
href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:void(0);"<!--content-->Thanks for the help guys, this is driving me NUTS!<br />
<br />
Unfortunately, no luck. I put in the exact script that pyro gave me, I copied and pasted, and put my web page in there etc. <br />
<br />
Now, the page opens, but it opens as a full size page with toolbars and scroll bars etc. <br />
<br />
For reference, here is my current code:<br />
<script language="javascript" type="text/javascript"> <br />
function setSize() {<br />
window.open('http://www.mywebpage.com/page2.htm','winname','height=320,width=320'); <br />
}<br />
</SCRIPT><br />
<br />
Any reccomendations are gladly appreciated. THIS IS DRIVING ME NUTS! <br />
Just to note, I am putting this code into the page that I want to open that way. Also, I don't know what you mean khalidali63 with some of the things you said. All I did was past this code into the html of the page I want to load and I uploaded that page and typed that address in directly to access the page.<br />
<br />
Please help!!<br />
<br />
Thanks!<!--content-->Post a link for us to look at...<!--content-->ok, thanks very much. Here is the link:<br />
<!-- m --><a class="postlink" href="http://www.markbosnian.com/bos.htm">http://www.markbosnian.com/bos.htm</a><!-- m --><br />
<br />
As you will notice, when you open the page, first of all 2 pages open, 1 full size and 1 correct size which correctly has no scroll bars or toolbars BUT, someting is wrong with the page, if you scroll your mouse onto it, it flashes constantly and for some unknown reason, it opens a larger page as well.<br />
<br />
Please take a look.<br />
<br />
Thanks!<!--content-->Here use this code....<br />
<br />
<html><br />
<br />
<head><br />
<meta http-equiv="Content-Language" content="en-us"><br />
<meta name="GENERATOR" content="Microsoft FrontPage 5.0"><br />
<meta name="ProgId" content="FrontPage.Editor.Document"><br />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><br />
<title>New Page 6</title><br />
<script language="javascript" type="text/javascript"> <br />
function setSize() {<br />
window.open("http://www.markbosnian.com","newWin","height=320,width=320"); //http://www.markbosnian.com/bos.htm<br />
}<br />
</SCRIPT><br />
</head><br />
<br />
<body><br />
<body><br />
<br />
<p><b><font size="4" color="#FF0000">Mark Bosnian Vocal Exercises</font></b></p><br />
<p>&nbsp;</p><br />
<p>Exercise #1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<b><font color="#000080"><span onclick="setSize();"> Listen Here to open window!</span></font></b></p><br />
<p>Exercise #2</p><br />
<p>&nbsp;</p><br />
<br />
</body><br />
<br />
</html><br />
<br />
<br />
I noticed few things in your code..<br />
1. It seems to me that you want the parent window to be closed when the small window is opened??is it true<br />
<br />
2. when you bring your cursor on the small window it flashes,that is because this page is coninously loading itself in a loop.<br />
lol<br />
why because the link you have is opens the main page and small window and then the same link you have for the small widnow....use the code I posted and you will be fine,I moved the onload event to the click event where it says "Click here"<!--content-->Thanks khalidali63,<br />
I'm going nuts though because it didn't work.<br />
<br />
I copied and pasted your code exactly and now it just opens the page as a full size page with toolbars and scrollbars etc.<br />
Maybe I'm an idiot but I swear I used your exact code!<br />
<br />
Check it out here:<br />
<!-- m --><a class="postlink" href="http://www.markbosnian.com/bos.htm">http://www.markbosnian.com/bos.htm</a><!-- m --><br />
<br />
Thanks, I appreciate it.<!--content-->your frustration is understandable,we all get our doze on and off..<br />
<br />
the code I posted above,I have changed the functionality a bit.<br />
You will have to click on this string <br />
<br />
"Listen Here to open window!"<br />
<br />
to open the child window.<!--content-->Thanks khalidali63, <br />
It is all working correctly now!!<br />
<br />
Thanks!<!--content-->
 
Back
Top