La llamo así:
Código PHP:
Ver original
<script type="text/javascript" src="js_menu/funcdin4.js"></script> <a class="dock-item" onclick="GuardaFormulario();"><span>Validar</span><img src="imagenes_menu/untitled.png" style="cursor:pointer" alt="Validar"/></a> <form action="menu5.php" method="post" name="form1" id="form1"> <table width="79%"> <tr> <th scope="col" width="57">Teléfonos</th> <th scope="col" width="52"><input name="telefonos" type="text" size="9" maxlength="9" value="" /></th> </tr> </table> </form>
funcdin4.js
Código PHP:
Ver original
function GuardaFormulario() { var telefonos = document.forms['form1'].elements['telefonos']; if (telefonos.value.length == 0) { alert("Insertar el Teléfono"); telefonos.focus(); return 0; }
Me da error ReferenceError: GuardaFormulario is not defined
Gracias