I have this page displaying some details of a profile from a database. Eg, name, quantity requested. Then, this same page I have this field called quantity issued. Instead of keying in the same figure same most of the time in this field, I thought about having a checkbox, which once user click, the value of quantity issued will be same with quantity requested. The problem is I don't really know how this value from recordset to be converted to client-side value. Code is something like below:
function checkChoice(whichbox)
{
with (whichbox.form)
{
if (whichbox.checked == true)
{
document.myform.qty_issued_fr.value = document.myform.qty_requested_fr.value;
}
else
{
document.myform.qty_issued_fr.value="";
document.myform.qty_issued_fr.focus();
}
}
}
<tr>
<td>Quantity requested:</td>
<td><input type=text name=qty_requested_fr size=9 value="<%=strQtyRequested%>" readonly></td>
</tr>
<tr>
<td>Quantity issued:</td>
<td><input type=text name=qty_issued_fr size=9><input type=checkbox name=chksame onclick="checkChoice(this);"> same as above
</td>
</tr>
http://www.htmlforums.com/attachment.php?s=&postid=166394
Thanks.
Edited by ngaisteve1