Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/09/2013, 05:32
xsaboteadorx
 
Fecha de Ingreso: junio-2013
Ubicación: Bs aS
Mensajes: 20
Antigüedad: 11 años, 8 meses
Puntos: 0
Exclamación Problema con IF en javascript

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.     var cod_unidad="", cod_unisup="", abreviatura="", descripcion="", desc_ant="", desc_hist="", desc_radio="", cod_guarnicion="", cod_desfa="", calle="", casa="", dpto="", cod_postal="", localidad="", cod_provincia="", telex="", telefono="", x="", y="", nivel="", cuenta="", org_comun="", fte_recluta="", bal="", escuela="", grupo="", oficiales="", suboficiales="", estado="", cod_uniorig="", activa="", localizacion="", cod_mov="", nro_mov="", fec_mov="", cod_ope="", fec_ope="", correo="", sitelpar="", equipo1="", equipo2="", equipo3="", coef_zona="", ala="", dela="", orden_resol="", cod_grupo="", cod_subgrupo="", programa="", zona="", actividad="", bsc_nivel="", obs="", depend="", nc="", ema="", cjrm="", recluta="", nodo="", acceso_internet="";
  3.     document.getElementById("label_cod_unisup").innerHTML="";
  4.     //________________________________________________________________________________________________________________________ 
  5.     function modificarInformacion(){
  6.         cod_unidad = document.getElementById("cod_editar").value;
  7.         cod_unisup = document.getElementById("cod_unisup_editar").value;
  8.         abreviatura = document.getElementById("abreviatura_editar").value;
  9.         descripcion = document.getElementById("descripcion_editar").value;
  10.         desc_ant = document.getElementById("desc_ant_editar").value;
  11.         desc_hist = document.getElementById("desc_hist_editar").value;
  12.         desc_radio = document.getElementById("desc_radio_editar").value;
  13.         cod_guarnicion = document.getElementById("cod_guarnicion_editar").value;
  14.         cod_desfa = document.getElementById("cod_desfa_editar").value;
  15.         calle = document.getElementById("calle_editar").value;
  16.         casa = document.getElementById("casa_editar").value;
  17.         dpto = document.getElementById("dpto_editar").value;
  18.         cod_postal = document.getElementById("cod_postal_editar").value;
  19.         localidad = document.getElementById("localidad_editar").value;
  20.         cod_provincia = document.getElementById("cod_provincia_editar").value;
  21.         telex = document.getElementById("telex_editar").value;
  22.         telefono = document.getElementById("telefono_editar").value;
  23.         x = document.getElementById("x_editar").value;
  24.         y = document.getElementById("y_editar").value;
  25.         nivel = document.getElementById("nivel_editar").value;
  26.         cuenta = document.getElementById("cuenta_editar").value;
  27.         org_comun = document.getElementById("org_comun_editar").value;
  28.         fte_recluta = document.getElementById("fte_recluta_editar").value;
  29.         bal = document.getElementById("bal_editar").value;
  30.         escuela = document.getElementById("escuela_editar").value;
  31.         grupo = document.getElementById("grupo_editar").value;
  32.         oficiales = document.getElementById("oficiales_editar").value;
  33.         suboficiales = document.getElementById("suboficiales_editar").value;
  34.         estado = document.getElementById("estado_editar").value;
  35.         cod_uniorig = document.getElementById("cod_uniorig_editar").value;
  36.         activa = document.getElementById("activa_editar").value;
  37.         localizacion = document.getElementById("localizacion_editar").value;
  38.         cod_mov = document.getElementById("cod_mov_editar").value;
  39.         nro_mov = document.getElementById("nro_mov_editar").value;
  40.         fec_mov = document.getElementById("fec_mov_editar").value;
  41.         cod_ope = document.getElementById("cod_ope_editar").value;
  42.         fec_ope = document.getElementById("fec_ope_editar").value;
  43.         correo = document.getElementById("correo_editar").value;
  44.         sitelpar = document.getElementById("sitelpar_editar").value;
  45.         equipo1 = document.getElementById("equipo1_editar").value;
  46.         equipo2 = document.getElementById("equipo2_editar").value;
  47.         equipo3 = document.getElementById("equipo3_editar").value;
  48.         coef_zona = document.getElementById("coef_zona_editar").value;
  49.         ala = document.getElementById("ala_editar").value;
  50.         dela = document.getElementById("dela_editar").value;
  51.         orden_resol = document.getElementById("orden_resol_editar").value;
  52.         cod_grupo = document.getElementById("cod_grupo_editar").value;
  53.         cod_subgrupo = document.getElementById("cod_subgrupo_editar").value;
  54.         programa = document.getElementById("programa_editar").value;
  55.         zona = document.getElementById("zona_editar").value;
  56.         actividad = document.getElementById("actividad_editar").value;
  57.         bsc_nivel = document.getElementById("bsc_nivel_editar").value;
  58.         obs = document.getElementById("obs_editar").value;
  59.         depend = document.getElementById("depend_editar").value;
  60.         nc = document.getElementById("nc_editar").value;
  61.         ema = document.getElementById("ema_editar").value;
  62.         cjrm = document.getElementById("cjrm_editar").value;
  63.         recluta = document.getElementById("recluta_editar").value;
  64.         nodo = document.getElementById("nodo_editar").value;
  65.         acceso_internet = document.getElementById("acceso_internet_editar").value;
  66.         [COLOR="Red"]if(cod_unisup!="" && abreviatura!="" && descripcion!="" && desc_ant!="" && desc_hist!="" && desc_radio!="" && cod_guarnicion!="" && cod_desfa!="" && calle!="" && casa!="" && dpto!="" && cod_postal!="" && localidad!="" && cod_provincia!="" && telex!="" && telefono!="" && x!="" && y!="" && nivel!="" && cuenta!="" && org_comun!="" && fte_recluta!="" && bal!="" && escuela!="" && grupo!="" && oficiales!="" && suboficiales!="" && estado!="" && cod_uniorig!="" && activa!="" && localizacion!="" && cod_mov!="" && nro_mov!="" && fec_mov!="" && cod_ope!="" && fec_ope!="" && correo!="" && sitelpar!="" && equipo1!="" && equipo2!="" && equipo3!="" && coef_zona!="" && ala!="" && dela!="" && orden_resol!="" && cod_grupo!="" && cod_subgrupo!="" && programa!="" && zona!="" && actividad!="" && bsc_nivel!="" && obs!="" && depend!="" nc!="" && ema!="" && cjrm!="" && recluta!="" && nodo!="" && acceso_internet!="")[/COLOR]{
  67.             ajax_("../control/controlador.php?cod_unisup_editar="+cod_unisup+"&abreviatura_editar="+abreviatura+"&descripcion_editar="+descripcion+"&desc_ant_editar="+desc_ant+"&desc_hist_editar="+desc_hist+"&desc_radio_editar="+desc_radio+"&calle_editar="+calle+"&casa_editar="+casa+"&dpto_editar="+dpto+"&cod_postal_editar="+cod_postal++"&localidad_editar="+localidad+"&cod_provincia_editar="+cod_provincia+"&telex_editar="+telex+"&telefono_editar="+telefono++"&x_editar="+x+"&y_editar="+y+"&nivel_editar="+nivel+"&cuenta_editar="+cuenta+"&org_comun_editar="+org_comun+"&fte_recluta_editar="+fte_recluta+"&bal_editar="+bal+"&escuela_editar="+escuela+"&grupo_editar="+grupo+"&oficiales_editar="+oficiales++"&suboficiales_editar="+suboficiales+"&estado_editar="+estado+"&cod_uniorig_editar="+cod_uniorig+"&activa_editar="+activa+"&localizacion_editar="+localizacion+"&cod_mov_editar="+cod_mov+"&nro_mov_editar="+nro_mov+"&fec_mov_editar="+fec_mov+"&cod_ope_editar="+cod_ope+"&fec_ope_editar="+fec_ope+"&correo_editar="+correo+"&sitelpar_editar="+sitelpar+"&equipo1_editar="+equipo1+"&equipo2_editar="+equipo2+"&equipo3_editar="+equipo3+"&coef_zona_editar="+coef_zona+"&ala_editar="+ala+"&dela_editar="+dela+"&orden_resol_editar="+orden_resol+"&cod_grupo_editar="+cod_grupo+"&cod_subgrupo_editar="+cod_subgrupo+"&programa_editar="+programa+"&zona_editar="+zona+"&actividad_editar="+actividad+"&bsc_nivel_editar="+bsc_nivel+"&obs_editar="+obs+"&depend_editar="+depend+"&nc_editar="+nc+"&ema_editar="+ema+"&cjrm_editar="+cjrm+"&recluta_editar="+recluta+"&nodo_editar="+nodo+"&acceso_internet_editar="+acceso_internet+"&unidad_editar="+cod_unidad);   
  68.         }else{
  69.             alert("Ingrese toda la informacion."); 
  70.         }      
  71.     }
  72.     //________________________________________________________________________________________________________________________     
  73.     }
  74. </script>

ERROR QUE ME TIRA ES CUANDO APRETO EN EL FORMULARIO EL BOTON MODIFICAR:
ReferenceError: modificarInformacion is not defined


modificarInformacion();

fancyB...onclick (línea 2)