Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/03/2014, 10:02
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
No funciona código

Hola por favor me podeis revisar este código que no funciona ?

Código Javascript:
Ver original
  1. <script>
  2. $(document).ready(function() {
  3.    
  4.    
  5.     $("#salida_factprint").click(function(){
  6.        
  7.  
  8.  
  9.     var id_aviso = document.forms['form2'].elements['id_aviso'];
  10.    
  11.         if (window.XMLHttpRequest)
  12.         {
  13.             xmlhttp=new XMLHttpRequest();
  14.         }
  15.         else
  16.         {
  17.             xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  18.         }  
  19.         xmlhttp.open("GET", "res_print-fact.php?id_aviso=" + id_aviso.value, false);
  20.         xmlhttp.send();    
  21.  
  22.         if (xmlhttp.readyState==4 && xmlhttp.status==200)      
  23.         {
  24.             var xml = xmlhttp.responseXML;
  25.             dato=xml.getElementsByTagName("numusuario");
  26.            
  27.                
  28. if (dato[0].firstChild.nodeValue=="1")
  29. {
  30.   window.location ="plantilla_factura_mc_PDF_1.php?id_aviso=" + id_aviso.value;  
  31. }
  32. else
  33. {
  34.   if (dato[0].firstChild.nodeValue=="2")
  35.   {              
  36.      window.location ="plantilla_factura_mc_PDF_2.php?id_aviso=" + id_aviso.value;  
  37.   }
  38.   else
  39.   {
  40.  if (dato[0].firstChild.nodeValue=="3")
  41.   {              
  42.      window.location ="plantilla_factura_mc_PDF_3.php?id_aviso=" + id_aviso.value;  
  43.   }
  44.   else
  45.   {  
  46.      
  47.      
  48.  window.location ="plantilla_factura_mc_PDF.php?id_aviso=" + id_aviso.value;      
  49.    
  50.      }
  51.    }       
  52.   }
  53. }
  54.  
  55.        
  56.     });
  57.  
  58.  });            
  59. </script>


Gracias y un saludo