php - sending values to another page with jQuery -
i need on how send values jquery when checkbox checked. far have jquery disable checkbox when checked. need process sql when checkbox selected well. please me on how this.
$('.processcheckbox').change(function() { if (this.checked) { this.setattribute("disabled", true); } });
so need send these 2 values $init , $char data_process.php when checkbox selected.
<?php $init = 0; $char = 'y'; echo "<td><input type='checkbox' class='processcheckbox' name='processcheckbox' /></td>"; ?>
any appreciated
when render page using php can pass $init
, $char
variables client side javascript.
then, in $('.processcheckbox').change
handler, can use jquery $.post
or $.get
functions make request data_process.php
, , pass values parameters of request.
for more info: https://api.jquery.com/jquery.post/
Comments
Post a Comment