Dear All,
I have something case with My Code,
Last time, I make a code for textbox calendar, and it was worked.
But I want calendar can open in textbox 2,3,4, etc.
This is my code :
- First step, We must enter number of employee, then form will be serve any textbox based on out choosen.
<form name="form" action="submit_woas.php" method="post" onSubmit="return validate(form);" onkeypress="return isNumberKey(event)" autocomplete="off">
<div id="text_position" >
<div id="text_number"></div>
<div class="padding">Enter number of employee :</div>
<input class="text sign" type="text" id="jum" name="jum" maxlength="3">
<div id="submit_button"><input type="submit" name="submit" value="Submit" /></div>
</div>
</form>
- This is a code, where I want date can be show in calendar textbox.
<form name="form" method="post" action="add_overtime_submission.php" id="form" autocomplete="off">
<div style="width:778px; height:400px; overflow:auto;">
<table>
<tr>
<td>Badge ID</td>
<td>Employee Name</td>
<td>Department</td>
<td>Overtime Date</td>
<td>From</td>
<td>To</td>
<td>Remarks</td>
</tr>
<?php
$n = $_POST['jum'];
for ($i=1; $i<=$n; $i++)
{
echo '
<tr>
<td><input type="text" size="6" name="badge_id' . $i .'" maxlength="6"
onchange="javascript:this.value=this.value.toUpperCase();"
onkeyup="getCity(\'search.php?badge_id=\'+this.value, \'employee_name' . $i . '\',\'dept' . $i . '\');" id="badge_id"></td>
<td><input type="text" size="22" name="employee_name' . $i . '" id="employee_name' . $i . '" readonly tabindex="1"></td>
<td>
<input type="text" size="9" name="dept' . $i . '" id="dept' . $i . '" value="Accounting" readonly tabindex="2"></td>
<!-- -->
<td><input type="text" size="10" name="ot_date' . $i .'" id="extendedDates" readonly></td>
<td><input type="text" size="4" name="ot_from' . $i . '" id="time1" value="08:00" readonly></td>
<td><input type="text" size="4" name="ot_to' . $i . '" id="time2" value="09:00" readonly></td>
<td><input type="text" size="22" name="remarks' . $i . '" maxlength="30"></td>
</tr>';
}
?>
</table>
<br>
<input type="hidden" name="jum" value="<?php echo $n; ?>">
<input type="submit" name="submit" value="Submit" id="button">
<input type="button" VALUE="Cancel" onClick="history.go(-1);return true;">
</div>
</form>
In first calendar textbox, it's ok and show the calendar, but when I click textboxk calendar2, it's not show the calendar.
Appreciate with your helps.
Thank you.