Error "Cal1' is Null or not an object

Discussion in 'JavaScript' started by jponte, Apr 30, 2007.

  1. #1
    Hi,
    I hope you can help. I'm very savy when it comes to Javascript although most of the time I get the code to run the way I want. Not this time. I'm trying to use the calendarpopup.js and receive an error all the time.

    http://www.mattkruse.com/javascript/calendarpopup/

    Here is the code I use on the page:

    <SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT>
    ................
    <form>
    Default calendar.<BR>
    <SCRIPT LANGUAGE="JavaScript" ID="js1">
    var cal1 = new CalendarPopup();
    </SCRIPT>
    <INPUT TYPE="text" NAME="date1" VALUE="" SIZE=25>
    <A HREF="#" onClick="cal1.select(document.forms[0].date1,'anchor1','MM/dd/yyyy'); return false;" TITLE="cal1.select(document.forms[0].date1,'anchor1','MM/dd/yyyy'); return false;" NAME="anchor1" ID="anchor1">select</A>
    ........

    The error is Error "Cal1' is Null or not an object Let me know if you can help.

    Peace,

    JP
     
    jponte, Apr 30, 2007 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Maybe because the error is on Capitalized variable and you're defining a lowercase variable.
     
    ajsa52, May 1, 2007 IP
  3. jponte

    jponte Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,
    I checked and they are all the same case. Any other suggestions?
    Thanks for the try,

    Jack Ponte
     
    jponte, May 1, 2007 IP