0
Colleagues.
I have through the model of Industrial maintenance in Ajax and thanks to our colleague Dontvotemedown, I can change tabs through the button type, but how would I change tabs, register the information from the previous tab in the bank? The registration in PHP/Mysql I know how to do, what is happening is that when changing tab, there is no input, only if I use the Submit. See below ( I changed the code and is registering in the database, but how do I pass the form values to jquery? ):
<script>
$(function() {
$( "#tabs" ).tabs();
$("#btnComprar").on("click", function()
{
$.post("cadastrar_.php", // Cadastando OK
{
// Como faço para pegar os valores do formulário e jogar para o campo abaixo?
nome: "nome do usuário",
idade: "idade"
},
function(data, status){
// alert("Data: " + data + "\nStatus: " + status);
});
var indice = $('#tabs ul li a[href="#' + $(this).parent().prop("id") + '"]').parent().index();
$("#tabs").tabs("option", "active", (indice + 1));
});
$(".voltar").on("click", function()
{
var indice = $('#tabs ul li a[href="#' + $(this).parent().prop("id") + '"]').parent().index();
$("#tabs").tabs("option", "active", (indice - 1));
});
});
</script>
<button type="button" id="btnComprar" class="proximo btn btn-success pull-right proximo" name="Valor" value="Comprar" style="margin-right: 10px" disabled="disabled"/><i class="fa fa-cart-plus"></i> Comprar </button>
You are trying to make a Wizard install form?
– Marcelo de Andrade