On Sun, 2 Nov 2014 01:49:36 -0700 (PDT), htc310.1408@gmail.com wrote:
> Hello,
>
> when I use the addLoadEvent with a self developed function (expected to be
> reload only once when addLoadEvent calls), it seems the page is reloaded
> endlessly. Anyone out there know the reason and advise a hint to solve
> the problem?
>
> -------------------------------------------
> <script>
> function addLoadEvent(func) {
> var oldonload = window.onload;
> if (typeof window.onload != 'function') {
> window.onload = func;
> } else {
> window.onload = function() {
> if (oldonload) {
> oldonload();
> }
> func();
> }
> }
> }
>
> function loadImage () {...};
>
> addLoadEvent(loadImage);
> </script>
>
> <form action="testing.jsp" method=post>
> ...
> </form>
> -------------------------------------------
>
> Any help is apperciated:p
None of the provided code can trigger a page reload.
The page reload is likely caused by the other code that aren't provided.