Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/02/2014, 09:17
Avatar de Benderzuelo
Benderzuelo
 
Fecha de Ingreso: mayo-2013
Ubicación: España
Mensajes: 223
Antigüedad: 11 años
Puntos: 5
Información Formato correcto en DATA

Buenas tardes,

resulta que yo tenia una función que funcionaba bien, pero solo recivía un parámetro, ahora la he tenido que modificar y necesito pasarle 2 parametros más, pero solo me coge el primero, el resto no llegan al PHP, pongo la función...

Código Javascript:
Ver original
  1. function compruebaNumeroTelefono(agcyID,agID){
  2.     var telf = $('#propertyOwnerPhone').val();
  3.     var agencyID = agcyID;ESTE ES UNO DE LOS VALORES NUEVOS
  4.     var agentID = agID; ESTE ES EL OTRO VALOR NUEVO
  5.     telf = telf.trim();
  6.     if(telf.length == 9 ){
  7.         $.ajax({
  8.             type:"POST",
  9.             url: "actions/property/compruebaTelefono.php",
  10.             data:{telf : telf, agencyID : agencyID, agentID : agentID}// AQUI ES DONDE TENGO EL PROBLEMA, SOLO ME LLEGA EL PRIMERO, QUE ES EL QUE YA ME LLEGABA ANTES, PERO AL AÑDIR LOS OTROS DOS VALORES ME LLEGAN VACIOS, SUPONGO QUE SERA POR  SINTAXIS, PERO HE PROBADO DE TODO YA
  11.             }).done(function(msg){
  12.                 //alert(msg);
  13.                 if(msg != ''){
  14.                     var textoVentana = msg;
  15.                                 }
  16.                         $('body').append(ventana);
  17. });


Os agradecerí una ayudita, ya que no se que más hacer, he probado a poner los indices de los valores entre comillas y tampoco va, solo me llega al archivo PHP el primer valor, en este caso es TELF, pero si cambio el orden, me llega siempre el primero.

Gracias de nuevo