I have an ajax that sends through post
, some information in PHP to another page. I save this information in session
.
I would like to update the div
where I have a modal. In case, this modal would have to refresh without giving refresh in the entire page, only in it to get the value of $_SESSION['IMPR_PEDIDO']['pedido']
current. Does anyone know how to do it?
<div class="modal fade" id="altera_cliente" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header modal_pedido">
<button type="button" class="close" data-dismiss="modal" aria-label="Fechar"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="modalLabel">PedidoOnline gerado com sucesso!</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="form-group">
<a class='btn-info btn-mini' href='pedidos_pdf/pedido_/<?php echo $_SESSION['IMPR_PEDIDO']['pedido']; ?>.pdf' target='_blank' download='Pedido_<?php echo $_SESSION['IMPR_PEDIDO']['pedido']; ?>'><img border='0' src='./images/download9.png' alt='W3Schools'></a>
</div>
<p />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Sair</button>
</div>
</div>
</div>
</div>
javascript code:
$(document).ready(function () {
$('.informacoes').click(function () {
var dados = $(this).val();
$.ajax({
type: 'GET',
url: './ajax/pdf_pedido_faturado.php',
data: 'pedido=' + dados,
beforeSend: function () {
$('<div class="ajaxModal"><div class="ajaxModal-preload"><p>Salvando PDF aguarde!</p></div></div>').insertAfter('body');
$('.ajaxModal').fadeIn('fast');
},
success: function () {
ajaxModal_Close();
$('#altera_cliente').modal('show');
}
});
return false;
});
});