php - How could I perform two action on a button click -


i have page input fields , table , 3 button play , pause , stop respectively.i want refresh table part when ii press play button. want play button perform 2 action 1 run update query , reload page only. when click on pause button want stop reloading of table .and when press stop button want run udate query . using codeigniter, mvc architecture. tried , view page.

<meta http-equiv="refresh" content="300">    <input type="text" size="7" id="ic" name="ic" value="<?php echo set_value('ic',$ic); ?>" /> <input type="text" size="7" id="id" name="id" value="<?php echo set_value('id',$id); ?>" /> <button type="button" style="width:100px;">play</button> <button type="button" style="width:100px;">pause</button> <button type="button" style="width:100px;">stop</button> <table> <tr> <th> blah </th> <th> blah </th> <th> blah </th> </tr> //do  code </table>     

you can call 2 js functions @ time on click of button. way..

function jsfun1() {    //do action here }  function jsfun2() {    //do action here }  call both on onclick  <button type="button" style="width:100px;"  onclick="jsfun1(),jsfun2()">play</button> 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -