Home about IT Motivation Course Sales Project About Me

Monday, March 09, 2009

PHP: radio button on the new, edit and save within 1 pages

di bagian grid area untuk click mouse, tulis ini:

for (var I = 0; I < docForm1.po_dsc.length; I++) {
if (docForm1.po_dsc[I].value == '<?= $result[$i]["po_dsc"] ?>') {
docForm1.po_dsc[I].checked = 'true';
}
}

di bagian grid area tampilan tulis ini:

<td align="right" width="25" class="tf" ><? if($result[$i]["po_dsc"]=='0'){echo "No";}else{echo "Yes";}?></td>

dibagian entry data tulis ini:

<td class="nmf" style=" padding-left:20px;">PO DSC</td>
<td class="emf" style="padding-left:20px; font-size:9px;" ><font class="mf">Yes</font>
<input type="radio" name="po_dsc" value="1" onClick="agreesubmit(this)" />
&nbsp;&nbsp;&nbsp;&nbsp;
<font class="mf">No</font> <input type="radio" name="po_dsc" onClick="agreesubmit1(this)" value="0" ></td>
</td>

silakan di coba

No comments: