JavaScript window.onload Event

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JavaScript window.onload Event

Jared Carroll
I'm having trouble getting a JavaScript function called during the window.onload event.

The following doesn't seem to work when I have it as the body
of my component's #script method (defined as a string) or defined within a StyleLibrary
that's used by my application.

window.onload = function () {
  alert("hello")
}


- jare care

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript window.onload Event

Philippe Marschall
2006/2/20, Jared Carroll <[hidden email]>:

> I'm having trouble getting a JavaScript function called during the
> window.onload event.
>
> The following doesn't seem to work when I have it as the body
> of my component's #script method (defined as a string) or defined within a
> StyleLibrary
> that's used by my application.
>
> window.onload = function () {
>   alert("hello")
> }

You're probably looking for #addLoadScript:

Philippe
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside