Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/01/2013, 12:47
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 evento

Hola, por favor espero puedan ayudarme. Tengo una funcion llamada GuardaFormulario(); que no se por qué no me funciona.
La llamo así:
Código PHP:
Ver original
  1. <script type="text/javascript" src="js_menu/funcdin4.js"></script>
  2. <a class="dock-item" onclick="GuardaFormulario();"><span>Validar</span><img src="imagenes_menu/untitled.png" style="cursor:pointer" alt="Validar"/></a>
  3. <form action="menu5.php" method="post" name="form1" id="form1">
  4.           <table width="79%">
  5.             <tr>
  6.               <th scope="col" width="57">Teléfonos</th>
  7.               <th scope="col" width="52"><input name="telefonos" type="text" size="9" maxlength="9" value="" /></th>
  8.  </tr>
  9. </table>
  10. </form>

funcdin4.js

Código PHP:
Ver original
  1. function GuardaFormulario()
  2. {
  3.     var telefonos = document.forms['form1'].elements['telefonos'];
  4.     if (telefonos.value.length == 0)
  5.     {
  6.        
  7.         alert("Insertar el Teléfono");
  8.  
  9.         telefonos.focus();
  10.  
  11.         return 0;
  12.  
  13.     }


Me da error ReferenceError: GuardaFormulario is not defined


Gracias