i'm new in web programing and i have a problem with using javascript (jquery) in Cakephp . Indeed, I'm using a pop up (dialog) in jquery and depending on what the user click on the result has to be register in the database so i think i have to give the result to the controller. I don't know how to pass a value from the view to the controller without using a form. For example, when the user click on the button "yes" in the dialog I want to register this data. I put my code below , thank you.
//view.ctp
<script>
$(function() {
$( "#dialog-confirm" ).dialog({
modal: true,
buttons: {
"Oui": function() {
$( this ).dialog( "close" );
},
"Non": function() {
$( this ).dialog( "close" );
}
}
});
});
</script>
<div id="dialog-confirm" title="Confirmation de paiement">
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Avez vous effectué le paiement ? </p>
</div>
ajax?