0
I have the following situation, when I test is passing the parameter with var_dump
, does not return.
What I’m trying to do is not load a new page but let it all happen on Divs.
HTML:
<td align="center">
<?php echo '<a id="consulta" href="ver_imagem.phpid='.$aquivos['id_img'].'">Imagem '.$aquivos['id_img'].' </a>'; ?>
</td>
In the script try that:
<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>
You can put the PHP part in the question too?
– Sergio
href="ver_imagem.phpid='. $aquivos['id_img']. '" wouldn’t be href="ver_imagem.php? id='. $aquivos['id_img'].'"
– Leandro Curioso