[Javascript] looping through nodeList

Anthony Ettinger apwebdesign at yahoo.com
Tue Oct 18 16:15:17 CDT 2005


--- Mike Dougherty <mdougherty at pbp.com> wrote:

> It has nothing to do with parameters
> 
> When you use the window.onload=Name(); - you are
> assigning the results of having executed the Name 
> function to the window.onload method.
> 
> When you use the window.onload=Name; - you are
> assigning the function called Name to the 
> window.onload method.


How should I call function names then?

If I run window.onload=Foo; it works,

if I have:

window.onload=Bar;

function Bar()
{
    Foo;
}

Foo does not get called. It only works in the 2nd
instance if I call it as Foo();

What's going on here?

Anthony Ettinger
ph: (408) 656-2473
web: http://www.apwebdesign.com



More information about the Javascript mailing list