beginner

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pag64

    beginner

    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


  • David Dorward

    #2
    Re: beginner

    pag64 wrote:
    [color=blue]
    > 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 ??[/color]

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

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

    --
    David Dorward http://david.us-lot.org/
    Redesign in progress: http://stone.thecoreworlds.net/
    Microsoft announces IE is dead (so upgrade):

    Comment

    • Richard Hockey

      #3
      Re: beginner

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

      <body onLoad="DoFunct ion();">

      </body>
      </html>

      "pag64" <pag64@wanadoo. fr> wrote in message
      news:bdm3kk$dg1 [email protected] .fr...[color=blue]
      > 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
      >
      >[/color]


      Comment

      • Richard Hockey

        #4
        Re: beginner

        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="DoFunct ion();">

        </body>
        </html>

        "pag64" <pag64@wanadoo. fr> wrote in message
        news:bdm3kk$dg1 [email protected] .fr...[color=blue]
        > 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
        >
        >[/color]


        Comment

        • pag64

          #5
          Re: beginner

          Thanks so much for your answers.
          Have a good week.

          AG




          "pag64" <pag64@wanadoo. fr> a écrit dans le message de news:
          bdm3kk$dg1$1@ne ws-reader4.wanadoo .fr...[color=blue]
          > 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
          >
          >[/color]


          Comment

          Working...