Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: onload event outside the body tag


Message #1 by "Nabil" <nabilf@c...> on Thu, 23 Jan 2003 14:55:04
Thanks Robert

the function you gave works like magic.


> Subject: RE: onload event outside the body tag
> From: "Robert Nyman" <robert.nyman@c...>
> Date: Thu, 23 Jan 2003 15:50:58 +0100
> X-Message-Number: 3
>
> <script language=3D"JavaScript" type=3D"text/javascript">
> window.onload =3D function(){
> alert("DreamWeaver...");
> };
> </script>
>
> or
>
> <script language=3D"JavaScript" type=3D"text/javascript">
> window.onload =3D onLoadFunc;
> function onLoadFunc(){
> alert("DreamWeaver...");
> }
> </script>
>
> /Robert
>
>
>
> -----Original Message-----
> From: Nabil [mailto:nabilf@c...]
> Sent: Thursday, January 23, 2003 3:55 PM
> To: JavaScript HowTo
> Subject: [javascript_howto] onload event outside the body tag
>
>
> Hello,
>
> I'm using the templates in dreamweaver MX.
> Some of the pages need the onload event in the body tag. Is there a way
> that i can put this event in the head of the page rather than in the
> body
> tag, cause dreamweaver doesn't allow editable areas inside the body tag.
>
> I tried to put "window.onLoad =3D alert(1)" in the head, but the problem
> is
> that it's being executed directly without waiting the document to be
> loaded.
>
> I hope that someone has a solution for this.
>
> Many thanks.
>
>
>
> ---
>
> END OF DIGEST
>
>


  Return to Index