Board Logo

no popup
idrake - 3/12/2008 at 07:39 PM

so here's the code for my first attempt to implement the calendar:

<form name="schedule">
<input type="Text" name="input1" value="">
<a href="javascript:cal1.popup();"><img src="../tigra_calendar/img/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
</form><script language="JavaScript">
<!-- // create calendar object(s) just after form tag closed
// specify form element as the only parameter (document.forms['formname'].elements['inputname']);
// note: you can have as many calendar objects as you need for your application
var cal1 = new calendar1(document.forms['schedule'].elements['input1']);
cal1.year_scroll = true;
cal1.time_comp = false;
//-->
</script>

but what I get on the testing server is the form field followed by the alt text "click here to pick up the date" and no popup when that is clicked.
Firefox tells me I have 1 error: calendar 1 is not defined.
Any clues will be welcome...


tigra - 3/12/2008 at 08:52 PM

make sure to link calendar1.js to your HTML document. Make sure calendar1.js is at the location you're referring.


idrake - 3/13/2008 at 02:42 PM

Actually, I want just calendar2. I've gotten the path right, now, for the calendar thumbnail, but don't really know how to link to calendar2. Here's how my code looks now:

<form name="schedule">
<input type="Text" name="input1" value="">
<a href="javascript:call.popup();"><img src="tigra_calendar/img/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
</form><script language="JavaScript">
<!-- // create calendar object(s) just after form tag closed
// specify form element as the only parameter (document.forms['formname'].elements['inputname']);
// note: you can have as many calendar objects as you need for your application
var cal1 = new calendar2(document.forms['schedule'].elements['input1']);
cal1.year_scroll = true;
cal1.time_comp = false;
//-->
</script>

when I test in Firefox I get 2 errors: calendar2 is not defined; call is not defined.
How do I define these?
Again, thanks for the help!


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/