java - How to add onchange function inside php form input -


this php form input

 <?php echo form_input(array('name' => $items['rowid']."_qty",'id' => $items['rowid']."_qty", 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5'));  ?>                     <button class="btn btn-success " onclick="update_cart('<?=$items['rowid'];?>')" >update</button> 

help me add onchange function inside this

please define onchange key in setter , send in function name define function in javascript.

<?php echo form_input(array('name' => $items['rowid']."_qty",'id' => $items['rowid']."_qty",'onchange'=> $items['onchange'], 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5'));  ?> 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -