alternative to body onload=""

Discussion in 'Javascript' started by Peter Cartwright, Dec 21, 2003.

  1. Is there a functional equivalent to <body onload="function call" in the main script.

    Can one do something like document.body.onload=function call?
     
    Peter Cartwright, Dec 21, 2003
    #1
    1. Advertisements

  2. Peter Cartwright

    VK Guest

    self.onload = myFunctionName;
    /*no parenthesis after function name!*/
     
    VK, Dec 21, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fabio R.
    Replies:
    0
    Views:
    1,018
    Fabio R.
    Mar 25, 2005
  2. UJ
    Replies:
    4
    Views:
    9,845
    =?Utf-8?B?U3JlZWppdGggUmFt?=
    Jul 19, 2005
  3. cmay
    Replies:
    2
    Views:
    4,188
  4. Rich
    Replies:
    2
    Views:
    187
  5. nntp

    Any alternative to onload?

    nntp, Oct 18, 2004, in forum: Javascript
    Replies:
    8
    Views:
    168
    Randy Webb
    Oct 24, 2004
  6. David Otton

    window.onload and body.onload differences

    David Otton, Nov 4, 2004, in forum: Javascript
    Replies:
    2
    Views:
    817
    Martin Honnen
    Nov 4, 2004
  7. Replies:
    5
    Views:
    480
    Thomas 'PointedEars' Lahn
    May 15, 2005
  8. marco

    onload -->* no onload

    marco, Jun 22, 2006, in forum: Javascript
    Replies:
    7
    Views:
    424
    marco
    Jun 24, 2006
Loading...