[Javascript] auto resizing a window

Kelly, Kyle Kyle at admin.usf.edu
Mon Nov 5 23:37:59 CST 2001


Peter,

Thanks for the help. I got rid of the conditional, and left just this:

<script language="JavaScript">
<!--
	self.resizeTo(675,600);
//-->
</script>

http://theallthing.taa.usf.edu/

It works perfectly. When the window that this link comes up in loads up my
page, that code resizes the window to better accommodate the way I designed
my site. 

Plus I poked around a few of the links you sent earlier and have learned
some cool stuff. 

Thanks again. 

Kyle
-----Original Message-----
From: Peter Brunone [mailto:peter at brunone.com]
Sent: Monday, November 05, 2001 10:58 PM
To: javascript at LaTech.edu
Subject: RE: [Javascript] auto resizing a window


Kyle,

	What you're saying in the script below, is "if this document is
contained
within a frameset, then resize the window".  The problem with that is that
if the condition is true, then you can't resize the window containing the
file, because there isn't one; there is only a frameset, and THAT document
is contained by a window.  Did that make sense?  If anything, such a command
would reduce the size of the frame.
	If you need to resize a window from within one of the frames, try
using
top.resizeTo(675,600).  I've tested this in IE 5 and Netscape 4 and it
works; take the frame test out completely and let us know what happens.

Cheers,

Peter

|-----Original Message-----
|From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
|Behalf Of Kelly, Kyle
|Sent: Monday, November 05, 2001 6:07 PM
|To: 'javascript at LaTech.edu'
|Subject: RE: [Javascript] auto resizing a window
|
|
|Peter,
|
|thanks for responding. i tried that code, but i must be doing something
|wrong. The page doesn't resize itself, yet...
|
|here is the entire page that i am attempting to get to work: (at this url:
|http://theallthing.taa.usf.edu/ )
|
|i'm getting the error triangle at the bottom left of my IE 6 window that
|says error on page, object expected.
|
|<html><head><link rel="STYLESHEET" type="text/css" href="/tampa.css">
|<script language="JavaScript">
|<!--
|  if (top.frames.length!=0)
|{
|	self.resizeTo(675,600);
|}
|//-->
|</script>
|</head>
|
|<p>&nbsp;</p>
|<p>&nbsp;</p>
|<p>&nbsp;</p>
|<p>&nbsp;</p>
|<table width="500" border="0" align="center">
|  <tr>
|    <td>
|      <p align="center"><font size="4">Welcome to TheAllThing</font></p>
|      <p align="center"><font size="4">TheAllThing is best viewed at
|1024X768
|        <br>
|        Resolution on an Internet Explorer</font></p>
|      <p align="center"><font size="4">&lt;<a href="#"
|onMouseOver="MM_openBrWindow('default1.htm','','scrollbars=yes,widt
|h=675,hei
|ght=600')">Enter</a>&gt;</font></p>
|      </td>
|  </tr>
|</table>
|<p>&nbsp;</p>
|</html>
|
|THANKS,
|KYLE
|

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list