0
How do I take a value from a button in jquery and move to another page?
My problem is to pass the data of the request I received from the bank and make this data appear on another page and I want to do through this boot +:
knife-your-request.php
<div class="container">
<div class="heading step-head text-center padding-top-25 padding-bottom-25 margin-bottom-0">
<span><?php echo $rsCat['categoria_nome']; ?></span>
</div>
<?php
$sqlSubcat = "select subcategoria_id, subcategoria_nome from subcategoria where subcategoria_habilitado='1' and subcategoria_ativo='1' and categoria_id='".$rsCat['categoria_id']."'";
$tbSubcat = mysql_query($sqlSubcat) or die(mysql_error());
if(mysql_num_rows($tbSubcat) > 0){
while($rsSubcat = mysql_fetch_array($tbSubcat)){
?>
<h6 class="step-head text-center padding-bottom-10"><?php echo $rsSubcat['subcategoria_nome']; ?></h6>
<ul class="pizza-flavers">
<?php
$sqlItem = "select item_id, item_nome, item_descricao, item_preco from item where item_habilitado='1' and item_ativo='1' and categoria_id='".$rsCat['categoria_id']."' and subcategoria_id='".$rsSubcat['subcategoria_id']."' order by item_nome";
$tbItem = mysql_query($sqlItem) or die(mysql_error());
if(mysql_num_rows($tbItem) > 0){
$i=1;
while($rsItem = mysql_fetch_array($tbItem)){
?>
<li>
It selects the item, and the inputs, the problem is: when I click on the + I want it to identify it and when I click on the finish it should appear with this data that I solved on another page:
Javascript of the button "+"
$(document).ready(function() {
$(".pizza-add-sub").append('<div class="plus qty-pizza">+</div><div class="mines qty-pizza">-</div>');
$(".qty-pizza").on("click", function() {
var $button = $(this);
var oldValue = $button.parent().find("input").val();
if ($button.text() == "+") {
var newVal = parseFloat(oldValue) + 1;
} else {
// Don't allow decrementing below zero
if (oldValue > 0) {
var newVal = parseFloat(oldValue) - 1;
} else {
newVal = 0;
}
}
$button.parent().find("input").val(newVal);
var valorTotal = 0;
var valoresMultiplicar = 0;
$(".qtdpedidos").each(function() {
valorTotal += parseFloat($(this).data("preco") * $(this).val());
})
$(".item span").each(function() {
valoresMultiplicar += parseFloat($(this).html());
})
if (valorTotal==0){
$("#tot").text("");
$("#resultado").text('');
}else{
$("#tot").text('R$'+(parseFloat(valorTotal+5).toFixed(2)));
$("#resultado").text('R$'+parseFloat(valorTotal).toFixed(2));
}
});
});
When he appears on the button of "Finish" he should appear only what I solved on another page:
Page that should appear the data:
Order confirmation screen
Waiting for Marcus.
– Harakin