vendredi 15 janvier 2016

jQuery How to transmit data to another page (button, checkbox)

I have a data table with a button column and a checkbox column (and other columns filled with DB).

I have a script which fetches an ID of my checkbox

My table (HTML :

<td>
  <a href="#" class="btn btn-xs btn-warning boutonsolo" >Facturer</a>
</td>
<td>
  <div class="ckbox ckbox-success">
     <input type="checkbox" class="select-facture" name="id_commande[]" value ="<?= $commande->getId() ?>"/>
     <label for="checkboxSuccess"></label>
  </div>
</td>   

But now when I click on the button in my column I want to get an ID and I which further redirects the user to other page persisting that ID.

The only script I have made for this is :

$('.boutonsolo').click(function() {
  var test = $('.select-facture').val();
  alert(test);
});




Aucun commentaire:

Enregistrer un commentaire