By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,379 Members | 1,705 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,379 IT Pros & Developers. It's quick & easy.

beginner

P: n/a
I have the following message when I have to insert the
j. code into my html page :

Add the onLoad event handler into the BODY tag

The BODY part ok
The Head part ok
but the body tag ??
Can you tell me what I have to do and where
I have to insert the code
Thanking you in advance.

AG
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
pag64 wrote:
I have the following message when I have to insert the
j. code into my html page :

Add the onLoad event handler into the BODY tag

The BODY part ok
The Head part ok
but the body tag ??


<script type="text/javascript">
window.onload = fuction() {
do_stuff();
}
</script>

(Although they probably mean <body onload="do_stuff();">)

--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead
Jul 20 '05 #2

P: n/a
<html>
<head>
<title></title>
<script type="text/javascript">
DoFunction()
{
alert('Hello World');
}
</script>
</head>

<body onLoad="DoFunction();">

</body>
</html>

"pag64" <pa***@wanadoo.fr> wrote in message
news:bd**********@news-reader4.wanadoo.fr...
I have the following message when I have to insert the
j. code into my html page :

Add the onLoad event handler into the BODY tag

The BODY part ok
The Head part ok
but the body tag ??
Can you tell me what I have to do and where
I have to insert the code
Thanking you in advance.

AG

Jul 20 '05 #3

P: n/a
A rather trivial example of how to use the onLoad event in the body tag:

<html>
<head>
<title>OnLoad example</title>
<script type="text/javascript">
DoFunction()
{
alert('Hello World');
}
</script>
</head>

<body onLoad="DoFunction();">

</body>
</html>

"pag64" <pa***@wanadoo.fr> wrote in message
news:bd**********@news-reader4.wanadoo.fr...
I have the following message when I have to insert the
j. code into my html page :

Add the onLoad event handler into the BODY tag

The BODY part ok
The Head part ok
but the body tag ??
Can you tell me what I have to do and where
I have to insert the code
Thanking you in advance.

AG

Jul 20 '05 #4

P: n/a
Thanks so much for your answers.
Have a good week.

AG


"pag64" <pa***@wanadoo.fr> a écrit dans le message de news:
bd**********@news-reader4.wanadoo.fr...
I have the following message when I have to insert the
j. code into my html page :

Add the onLoad event handler into the BODY tag

The BODY part ok
The Head part ok
but the body tag ??
Can you tell me what I have to do and where
I have to insert the code
Thanking you in advance.

AG

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.