RE: page resizing

by "tim booker" <timbooker(at)btinternet.com>

 Date:  Wed, 1 Aug 2001 00:02:35 +0100
 To:  "'Nate Harel'" <nharel(at)consultant.com>,
"Hwg-Techniques \(E-mail\)" <hwg-techniques(at)hwg.org>
 In-Reply-To:  rcn
  todo: View Thread, Original
<body onResize="window.history.go(0)">


OR


function reloadPage()
 {
	window.history.go(0);
 }

onresize = reloadPage;



To answer your question properly, IE doesn't use window.innerWidth.  Use
document.body.clientWidth

Tim



> -----Original Message-----
> From: owner-hwg-techniques(at)hwg.org
> [mailto:owner-hwg-techniques(at)hwg.org]On Behalf Of Nate Harel
> Sent: 31 July 2001 20:24
> To: hwg-techniques(at)hwg.org
> Subject: page resizing
>
>
> Hi all,
>
> Perhaps I can get a bit of advice on this.
>
> I want to refresh a web page when it gets resized.
>
> I am using Dreamweaver and they have a little JS routine that
> does it for
> Netscape and it works fine. I wanted to implement the same
> functionality
> for IE and copied the code and made some minor mods to it.
> However, the
> page does not automatically refresh upon resizing. Some
> ideas/suggestions
> please.
>
> Here is the code and the page it is located on ...
>
> <script language="JavaScript">
> function reloadPage(init) {  //reloads the window if window resized
>    if (init==true) {
>      document.pgW=self.innerWidth;
> 	onresize=reloadPage; }
>    else
> 	if (self.innerWidth!=document.pgW )
> 		location.reload();
> }
> reloadPage(true);
> </script>
>
>
> http://www.nettech-hosting.net/SeedPartners/index.html
>
>
> Thanks
>
> Nate
>
> 		---------------------------------------------------
> 			 Nate Harel
> 		        NetTech Services
> 		        66 Carol Road
> 		  Needham, MA  02492-1108
> 		    Tel: 1-781-559-8176
> 		 Toll Free: 1-877-567-8936
> 		   FAX: 1-877-567-8936
> 		 Email: nharel(at)consultant.com
> 		     www.nettech-services.net
> 		----------------------------------------------------

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA