3
Glacier, I need to open one div
via ajax passing a ID
via POST
. Where am I going wrong.
HTML
<div class="row">
<div id="retorno_galeria">
<a onclick="galeria_id(this.id,' . $gal["id"] . ');" href="#">
</div>
</div>
Javascript
function galeria_id(id) {
var idGaleria = (this.value.id);
$.post(URL + 'Ajax/galeria', {val: idGaleria}, function (busca) {
$('#retorno_galeria').html(busca);
});
}
PHP
case 'galeria':
$char = $_POST['val'];
$tbody .= 'Teste retorno galeria ' . $char . '';
$retorno = $tbody;
break;
That’s right. Thank you
– Eduardo Santos