W3C home > Mailing lists > Public > www-html@w3.org > July 1999

RE: OnLoad Problem in Netscape

From: Zoltan Hawryluk <zoltan@netcom.ca>
Date: Fri, 30 Jul 1999 10:33:48 -0400
Message-ID: <051686CF5E6CD211B8FC00A0C9D4CF4578659F@exmail.corp.netcom.ca>
To: "'Ravindra Sharma'" <rsharma@marketfirst.com>, "'www-html@w3.org'" <www-html@w3.org>
ahh... 

the first question relates to a known bug in netscape that can be fixed.
when visiting the devedge website, i saw an article talking about this bug
and javascript at the end of this message as a solution.  it will detect if
a browser resize happens and will reload the page (window.history.go(0) does
the reload).  i have found this indispensible when doing dhtml with
netscape, since a resize tends to mess up all the css scripting i do.  i
don't know if it will fix your problem, but it might.

don't know much about the second question's problems, although i can see you
work around it with clever programming.

z.

/**
 * resize.js 0.3 970811
 * by gary smith
 * js component for "reloading page onResize"
 */

if(!window.saveInnerWidth) {
  window.onresize = resize;
  window.saveInnerWidth = window.innerWidth;
  window.saveInnerHeight = window.innerHeight;
}

function resize() {
    if (saveInnerWidth < window.innerWidth ||
        saveInnerWidth > window.innerWidth ||
        saveInnerHeight > window.innerHeight ||
        saveInnerHeight < window.innerHeight )
    {
        window.history.go(0);
    }
}



> -----Original Message-----
> From: www-html-request@w3.org 
> [mailto:www-html-request@w3.org]On Behalf
> Of Ravindra Sharma
> Sent: Thursday, July 29, 1999 11:20 PM
> To: www-html@w3.org
> Subject: OnLoad Problem in Netscape
> 
> 
> Hi,
> 
> I facing following problems with IE and Netscape browsers.
> 
> 1. Problem With netscape browser: I have written a OnLoad 
> function to change
> some hidden fields and label of buttons in the document. BUT if
> resize the netscape browser window it somehow refresh the document
> and assigns the original value back to those fields and labels
> to those buttons and DOES NOT CALL THE OnLoad FUNCTION AGAIN.
> 	This is big problem for me. How do I remove this problem?
> 
> IE does not have problem with this.
> 
> 2. Problem With IE: I have button which has onClick function. 
> At run time
> I want to change the onClick function at runtime (i.e. after page
> is loaded). Netscape allows to change as follows (in OnLoad function):
> 
> document.forms[0].button_name.onClick = newOnClickHandler;
> 
> But the same thing does not work under IE. Is that anyway to achieve
> the same behavior in IE.
> 
> Thanks,
> -ravi
> 
> 
Received on Friday, 30 July 1999 10:38:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:39 GMT