Javascript Calendar help

R

RoadKill

Hello,

Not sure if someone is familiar but I am using the Tigra Calendar that puts
a javascript popup calendar in your form. Anyway, it works great until I try
to put a second caldendar in. Essentially I want one for the person to select
the from date and a second for the two date. No matter what I do, both popup
calendars only change the first field. Any ideas?

<tr>
<td width="35%">Date Requested From:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="datefrom" size=10>
<a href="javascript:cal1.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose a
starting date."></td>
<script language="JavaScript">
var cal1 = new calendar2(document.forms['newhire'].elements['datefrom']);
cal1.year_scroll = true;
</script></span></td>
</tr>
<tr>
<td width="35%">Date Requested To:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="dateto" size=10>
<a href="javascript:cal1.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose an
ending date."></td>
<script language="JavaScript">
var cal1 = new calendar3(document.forms['newhire'].elements['dateto']);
cal1.year_scroll = true;
</script></span></td>
</tr>
 
T

Thomas A. Rowe

Try:

<tr>
<td width="35%">Date Requested From:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="datefrom" size=10>
<a href="javascript:cal1.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose a
starting date."></td>
<script language="JavaScript">
var cal1 = new calendar2(document.forms['newhire'].elements['datefrom']);
cal1.year_scroll = true;
</script></span></td>
</tr>
<tr>
<td width="35%">Date Requested To:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="dateto" size=10>
<a href="javascript:cal2.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose an
ending date."></td>
<script language="JavaScript">
var cal2 = new calendar3(document.forms['newhire'].elements['dateto']);
cal2.year_scroll = true;
</script></span></td>
</tr>

If you have a part of the script located in the head section of the page, you will need to duplicate
it rename to match script above.
--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
http://www.Ecom-Data.com
==============================================
 
R

RoadKill

I tried that already actually but went ahead and copied yours just in case I
had a typo in mine, but neither one works. With this version, the first
calendar works but the second one doesn't.

Thomas A. Rowe said:
Try:

<tr>
<td width="35%">Date Requested From:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="datefrom" size=10>
<a href="javascript:cal1.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose a
starting date."></td>
<script language="JavaScript">
var cal1 = new calendar2(document.forms['newhire'].elements['datefrom']);
cal1.year_scroll = true;
</script></span></td>
</tr>
<tr>
<td width="35%">Date Requested To:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="dateto" size=10>
<a href="javascript:cal2.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose an
ending date."></td>
<script language="JavaScript">
var cal2 = new calendar3(document.forms['newhire'].elements['dateto']);
cal2.year_scroll = true;
</script></span></td>
</tr>

If you have a part of the script located in the head section of the page, you will need to duplicate
it rename to match script above.
--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
http://www.Ecom-Data.com
==============================================


RoadKill said:
Hello,

Not sure if someone is familiar but I am using the Tigra Calendar that puts
a javascript popup calendar in your form. Anyway, it works great until I try
to put a second caldendar in. Essentially I want one for the person to select
the from date and a second for the two date. No matter what I do, both popup
calendars only change the first field. Any ideas?

<tr>
<td width="35%">Date Requested From:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="datefrom" size=10>
<a href="javascript:cal1.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose a
starting date."></td>
<script language="JavaScript">
var cal1 = new calendar2(document.forms['newhire'].elements['datefrom']);
cal1.year_scroll = true;
</script></span></td>
</tr>
<tr>
<td width="35%">Date Requested To:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="dateto" size=10>
<a href="javascript:cal1.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose an
ending date."></td>
<script language="JavaScript">
var cal1 = new calendar3(document.forms['newhire'].elements['dateto']);
cal1.year_scroll = true;
</script></span></td>
</tr>
 
T

Thomas A. Rowe

Have you contacted the author of the calendar script or tried another script?

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
http://www.Ecom-Data.com
==============================================


RoadKill said:
I tried that already actually but went ahead and copied yours just in case I
had a typo in mine, but neither one works. With this version, the first
calendar works but the second one doesn't.

Thomas A. Rowe said:
Try:

<tr>
<td width="35%">Date Requested From:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="datefrom" size=10>
<a href="javascript:cal1.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose a
starting date."></td>
<script language="JavaScript">
var cal1 = new calendar2(document.forms['newhire'].elements['datefrom']);
cal1.year_scroll = true;
</script></span></td>
</tr>
<tr>
<td width="35%">Date Requested To:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="dateto" size=10>
<a href="javascript:cal2.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose an
ending date."></td>
<script language="JavaScript">
var cal2 = new calendar3(document.forms['newhire'].elements['dateto']);
cal2.year_scroll = true;
</script></span></td>
</tr>

If you have a part of the script located in the head section of the page, you will need to
duplicate
it rename to match script above.
--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
http://www.Ecom-Data.com
==============================================


RoadKill said:
Hello,

Not sure if someone is familiar but I am using the Tigra Calendar that puts
a javascript popup calendar in your form. Anyway, it works great until I try
to put a second caldendar in. Essentially I want one for the person to select
the from date and a second for the two date. No matter what I do, both popup
calendars only change the first field. Any ideas?

<tr>
<td width="35%">Date Requested From:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="datefrom" size=10>
<a href="javascript:cal1.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose a
starting date."></td>
<script language="JavaScript">
var cal1 = new calendar2(document.forms['newhire'].elements['datefrom']);
cal1.year_scroll = true;
</script></span></td>
</tr>
<tr>
<td width="35%">Date Requested To:</td>
<td width="65%"><span lang="en-us">
<input type="text" name="dateto" size=10>
<a href="javascript:cal1.popup();">
<img src="cal/cal.gif" width="16" height="16" border="0" alt="Choose an
ending date."></td>
<script language="JavaScript">
var cal1 = new calendar3(document.forms['newhire'].elements['dateto']);
cal1.year_scroll = true;
</script></span></td>
</tr>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top