I have the following situation, when testo is passing the parameter with var_dump
, it does not return.
What I'm trying to do is not load a new page but everything happens on the divs.
HTML:
<td align="center">
<?php echo '<a id="consulta" href="ver_imagem.phpid='.$aquivos['id_img'].'">Imagem '.$aquivos['id_img'].' </a>'; ?>
</td>
In script I try this:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#consulta').click(function(){
var dados = jQuery( this ).serialize();
jQuery.ajax({
type: "GET",
url: "ver_imagem.php",
data: dados,
success: function( data )
{
$("#imagens_pn").empty();
$("#imagens_pn").append(data);
}
});
return false;
});
});
</script>