Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Calender Object Errors

Posts: 1
Registered: 2/26/2003
Member Is Offline
posted on 2/26/2003 at 04:17 AM Reply With Quote
Calender Object Errors

I have a test page and all .js files in same directory, but am getting a "cal" is undefined. I am just starting with JavaScript. Can anyone tell me what I else I need to do? Some of this setup came from another post. Thanks.

<title>Calender test</title>
<script language="JavaScript" SRC="calendar1.js">


<form name="caltest" method="POST" action="anotherform.cgi">

<script language="JavaScript">
var cal = new calendar1(document.forms['getDate'].elements['date']);
<p>Calendar test </p>
<p><input type="text" name="date" value="" size="20"> <a href="javascript:cal.popup();"><img border="0" src="images/cal.gif" alt="Click here to select access a calender" width="16" height="16"></a></p>
<p><input type="submit" value="Submit" name="B1"></p>
View User's Profile View All Posts By User U2U Member

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 3/8/2003 at 12:02 PM Reply With Quote

1. Move calendar initialization block out of the form. Put it just after closing </form> tag

2. In calendar constructor you specify document.forms['getDate'] while name of the form is 'caltest' (not 'getDate')
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum

Go To Top

Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004