Forum Moderators: open
I want it to return a confirm box when clicked, and if the user clicks ok, it shud execute the function buy....its not wokring
However, the quick and dirty approach:
<input type="button" name="Button" value="Sell"
onClick="function(){
if (confirm('Are you sure you want to sell these shares?')) {
buy( 'txtHint1<?php echo $new_count;?>',
'<?=$row['company']?>',
qty.value,
'<?=$row['quantity']?>',
'sell',
'<?=$row['id']?>' );
update('update');
}
};"
>