Código HTML:
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"> <table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1" align="center"> <tr> <td> <hr noshade color="#666666"> </td> </tr> <tr> <td> <a href="edit_index.asp"><img border="0" src="/edit/imagenes/mancheta_2.gif" width="275" height="38"></a> </td> </tr> <tr> <td> <hr noshade color="#666666"> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <form name="formulario" action="edit_portada_registrar.asp" method="post" onsubmit="return validacion();"> <table border="0" width="800" cellpadding="0" align="center"> <tr> <td colspan="2" align="right"> <b><font face="Arial" size="2" color="#666666"> <% login=Session.Contents("login_global") Response.Write(login) %> </font></b> </td> </tr> <tr> <td colspan="2" align="right"> <b><font face="Arial" size="1" color="#666666"><a href="edit_index.asp">[Inicio]</a> <a href="edit_log_out.asp">[Abandonar sesión]</a></font></b> </td> </tr> <tr> <td colspan="2"align="right"> <hr noshade color="#666666" size="1"> </td> </tr> <tr> <td colspan="2" bgcolor="#666666" align="right"> <font face="arial" size="2" color="#ffffff"><b>Noticias </b></font> </td> </tr> <tr> <td colspan="2" align="right"> <font face="arial" size="1" color="#666666"> </font> </td> </tr> <tr> <td colspan="2" align="right"> <font face="arial" size="2" color="#666666"><b>Noticia destacada 1: </b></font><input name="not_dest_1" size="10" maxlength="4" value="<%Response.Write(datos("noticia1"))%>"> </td> </tr> <tr> <td colspan="2"> <hr noshade color="#666666" size="1"> </td> </tr> <tr> <td align="right"> <font face="arial" size="2" color="#666666"><b>Noticia destacada 2: </b></font><input name="not_dest_2" size="10" maxlength="4" value="<%Response.Write(datos("noticia2"))%>"> </td> <td align="right"> <font face="arial" size="2" color="#666666"><b>Noticia destacada 3: </b></font><input name="not_dest_3" size="10" maxlength="4" value="<%Response.Write(datos("noticia3"))%>"> </td> </tr> <tr> <td align="right"> <font face="arial" size="2" color="#666666"><b>Noticia destacada 4: </b></font><input name="not_dest_4" size="10" maxlength="4" value="<%Response.Write(datos("noticia4"))%>"> </td> <td align="right"> <font face="arial" size="2" color="#666666"><b>Noticia destacada 5: </b></font><input name="not_dest_5" size="10" maxlength="4" value="<%Response.Write(datos("noticia5"))%>"> </td> </tr> <tr> <td align="right"> <font face="arial" size="2" color="#666666"><b>Noticia destacada 6: </b></font><input name="not_dest_6" size="10" maxlength="4" value="<%Response.Write(datos("noticia6"))%>"> </td> <td align="right"> <font face="arial" size="2" color="#666666"><b>Noticia destacada 7: </b></font><input name="not_dest_7" size="10" maxlength="4" value="<%Response.Write(datos("noticia7"))%>"> </td> </tr> <tr> <td colspan="2" align="right"> <font face="arial" size="1" color="#666666"> </font> </td> </tr> <tr> <td colspan="2" bgcolor="#666666" align="right"> <font face="arial" size="2" color="#ffffff"><b>Vídeos </b></font> </td> </tr> <tr> <td colspan="2" align="right"> <font face="arial" size="1" color="#666666"> </font> </td> </tr> <tr> <td> </td> <td align="right"> <font face="arial" size="2" color="#666666"><b>Vídeo destacado 1: </b></font><input name="vid_dest_1" size="10" maxlength="4" value="<%Response.Write(datos("video1"))%>"> </td> </tr> <tr> <td colspan="2"> <hr noshade color="#666666" size="1"> </td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" value="Enviar"> <input type="reset" value="Limpiar formulario"> </td> </tr> </table> </form> </td> </tr> <tr> <td height="19"> <hr noshade color="#666666"> </td> </tr> </table> </body>
id_1=document.formulario.not_dest_1.value;
if(isNaN(id_1)==true)
id_1=false;
id_2=document.formulario.not_dest_2.value;
if(isNaN(id_2)==true)
id_2=false;
function validacion()
{
if((id_1==false)||(id_2==false))
{
alert("Debe introducir valores numéricos.");
return false;
}
}
El navegador dice que document.formulario.not_dest_1 es nulo o no es ningun objeto.
Me estoy volviendo loco
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
Gracias por adelantado