Ver Mensaje Individual
  #14 (permalink)  
Antiguo 12/06/2014, 14:36
Avatar de warywin
warywin
 
Fecha de Ingreso: octubre-2013
Mensajes: 155
Antigüedad: 10 años, 6 meses
Puntos: 1
Respuesta: Cambiar div sin recargar pag

hago lo que tu me dices pero no me recoge el dato del id:
Código HTML:
Ver original
  1. <input type="hidden" value="<?php $id ?>" name="ide" id="ide" />
Código Javascript:
Ver original
  1. $('#form, #fat, #fo3').submit(function() {
  2.     idVi = document.getElementById("ide").value;
  3. $.ajax({
  4.             type: 'POST',
  5.             url: $(this).attr('action'),
  6.             data: $(this).serialize(),
  7.                 id:idVi
  8.            success: function(data) {
  9.                 $('.votobtn').html(data);
  10.             }
  11.         })
votosbtn.php
Código PHP:
Ver original
  1. $id = mysql_real_escape_string(strip_tags($_POST['id']));
no agarra el id definiendolo encampo oculto y todo y no llega a hacer la consulta