Resizing a Web Page?

B

bobj

The following will resize a web page on opening
when put in the head section of the web page.

<script language="JavaScript">
<!--
window.moveTo (150, 75);
window.resizeTo (700, 600);
//-->
</script>

If I want to remove the scrollbars, status bar, tool bar,
menu bar, etc., how do I include that?

Thanks.
 
T

Tim Williams

You cannot do this on a page which is already open (and would be best
advised that it would be pretty annoying if you were able to....)

Option for removing chrome is only available if you're openeing a new
window using "window.open()"

Tim.
 
B

bobj

Very well then. I tried this:

<script language="javascript">
<!--
window.open('closings2.htm','', 'height=500,width=700, screenX=100,screenY=100,top=75,left=150,
location=0,menubar=0,resizable=1, status=1,toolbar=0,scrollbars=1');
window.opener=self;
window.close();
//-->
</script>

The above is in a web page called closings1.htm. closings1.htm is called by clicking
on a link on webpage1. When you click on the link, closing1.htm opens closings2.htm and then
closings1.htm closes.
However, it also closes webpage1.htm which I want to keep open.

How do I keep webpage1.htm open? If you like, you can go here and click on the scolling message
to see what I mean... http://www.svrops.com/montgomeryns/default.htm
 
J

juglesh

bobj said:
Very well then. I tried this:

<script language="javascript">
<!--
window.open('closings2.htm','', 'height=500,width=700,
screenX=100,screenY=100,top=75,left=150,
location=0,menubar=0,resizable=1, status=1,toolbar=0,scrollbars=1');
window.opener=self;
window.close();
//-->
</script>

The above is in a web page called closings1.htm. closings1.htm is called
by clicking
on a link on webpage1. When you click on the link, closing1.htm opens
closings2.htm and then
closings1.htm closes.
However, it also closes webpage1.htm which I want to keep open.

How do I keep webpage1.htm open? If you like, you can go here and click
on the scolling message
to see what I mean... http://www.svrops.com/montgomeryns/default.htm

I tried it, all it did for me was close IE. I figured out because I have
Google popup blocker. so, its doing the window close, but not popping the
popup. you should realize that more and more ppl are using popup blockers,
and your window.opens are going to be unreliable.

when you get right down to it, do you really even need a popup? why
couldn't the school closures just be displayed on a regular page?
 
T

Tim Williams

As juglesh notes, you would be better off just creating a regular page
and linking to it: more and more browsers will by default not show
pop-ups.

merry christmas

tim
 
B

bobj

Good point.... Thanks.


juglesh said:
I tried it, all it did for me was close IE. I figured out because I have
Google popup blocker. so, its doing the window close, but not popping the
popup. you should realize that more and more ppl are using popup blockers,
and your window.opens are going to be unreliable.

when you get right down to it, do you really even need a popup? why
couldn't the school closures just be displayed on a regular page?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top