Quick JavaScript question ...

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

    Quick JavaScript question ...

    Ok, so I have this simple code in a file ;

    var v = new array( 15 ) ;

    function Init()
    {
    for (var i = 0; i < v.length ; i ++)
    {
    v[i] = 0;
    }
    window.alert("H i");
    }

    If I put in the BODY tag onload="Init()" , the alert window never comes up,
    so I guess theres something wrong with the for loop, cause if I comment that
    out the windows comes up. So what is wrong wise ones ?

    TIA
    H


  • H

    #2
    Re: Quick JavaScript question ...

    Opps.. forget it.. Stupid me can't see difference between Versals and
    nonversal letters ...


    Comment

    • Jesper Matthiesen

      #3
      Re: Quick JavaScript question ...

      JavaScript != Java
      Regards Jesper


      Comment

      Working...