...

View Full Version : Calendar dependent on radio button



sakurasan
08-24-2010, 05:49 AM
I am working a form with radio button and calendar. What I would like to do is when the user selects Done - be able to display the calendar and if Not Done is selected, disable the calendar.

Here is my code:

<tr>
<td class="tajuk_kecil"><div align="right">Status </div></td>
<td class="tajuk_kecil"><div align="center">:</div></td>
<td>
<label><input name="status" type="radio" value="Done" checked>Done </label>
<label><input name="status" type="radio" value="Not Done">Not Done</label>
</td>
</tr >

<tr>
<td class="tajuk_kecil"><div align="right">Date</div></td>
<td class="tajuk_kecil"><div align="center">:</div></td>
<td>

<?php
$myCalendar = new tc_calendar("date5", true, false);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2000, 2015);
$myCalendar->dateAllow('2008-05-13', '2015-03-01');
$myCalendar->setDateFormat('j F Y');
$myCalendar->writeScript();
?> </td>

</tr>

Any suggestions would be greatly appreciated. Thanx

Dormilich
08-24-2010, 03:05 PM
this would imply the user submitting the form as PHP (on the server) cannot react to user interaction (on the client).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum