Foros del Web » Creando para Internet » Diseño Gráfico »

validar menús desplegables en el W3C

Estas en el tema de validar menús desplegables en el W3C en el foro de Diseño Gráfico en Foros del Web. Hola a todos, estoy intentando validar dos menús desplegables en el W3C pero n no entiendo el error que me da, yo no he hecho ...
  #1 (permalink)  
Antiguo 09/03/2008, 12:53
 
Fecha de Ingreso: marzo-2008
Mensajes: 5
Antigüedad: 16 años, 1 mes
Puntos: 0
Pregunta validar menús desplegables en el W3C

Hola a todos, estoy intentando validar dos menús desplegables en el W3C pero n no entiendo el error que me da, yo no he hecho la web y hay elementos en el formulario que no comprendo y son los que me dan problemas, a ver si me podeis hechar una manilla.
Os copio el código:
<h2>ARTÍCULOS RELATIVOS AL EMBARAZO</h2>
<form method="post" action="" name="formulario1">


<select name="formulario1" id="formulario1">



<option value="consejoscesareas.htm">Consejos para evitar cesáreas innecesarias
</option>

<option value="embarazadayfumas.htm">¿Estás embarazada y aún fumas?
</option>
<option value="depresionprenatal.htm">La depresión prenatal
</option>

<option value="adiostabaco.htm">Di adiós al tabaco!
</option>


<option value="ardor.htm">Ardor de estómago en embarazadas
</option>
<option value="diabetes.htm">El riesgo de la diabetes en el embarazo
</option>
<option value="hijobarriga.htm">¿Qué siente tu hijo en la barriga?
</option>
<option value="alimentaciongestacion.htm">La alimentación durante la gestación
</option>


<option value="dormirembarazo.htm">Consigue dormir bien en el embarazo
</option>

<option value="labioleporino.htm">El labio leporino se da más en hijos de mujeres que fumaron durante el embarazo
</option>
<option value="umbilical.htm">Las células del cordón umbilical, pueden salvar vidas de otras personas
</option>



<option value="folico.htm">El Ácido Fólico: Una Vitamina Esencial para la Vida
</option>


<option value="examenes.htm">Exámenes médicos para ser padres
</option>

<option value="estresenlamadre.htm">El estrés en la madre aumenta el riesgo de problemas mentales
</option>

<option value="sindromedelacovada.htm">Síndrome de la Covada
</option>

<option value="ejerciciospelvis.htm">Ejercicios para fortalecer los músculos pelvianos
</option>
<option value="estrias.htm">Las Estrías durante el embarazo
</option>
<option value="primerdia.htm">El primer día después del parto
</option>
<option value="hipopanza.htm">¿El bebé puede tener hipo dentro de la panza?
</option>

<option value="nicotina.htm">La exposición a la nicotina antes del nacimiento podría afectar al desarrollo de la visión y la audición
</option>
<option value="aire.htm">¿Es normal la falta de aire durante el embarazo?
</option>

<option value="cambiosvision.htm">Los cambios hormonales y migrañas durante el embarazo pueden afectar a la visión
</option>
<option value="cesarea.htm">¡Cesárea!
</option>




</select>
<input type="button" name="ir" value="Mostrar Artículo" onclick="document.location"="document.formulario1. formulario1.value"/>

</form>
<h2>ARTÍCULOS RELATIVOS A LOS BEBÉS</h2>
<form method="post" action="" name="formulario2" >



<select name="formulario2" id="formulario2">

<option value="educaciontemprana.htm">¿Qué es la educación temprana?
</option>
<option value="bebelibre.htm">Nace el primer bebé libre de enfermedad hereditaria
</option>

<option value="hablarbebe.htm">¿Cómo hablarle a tu bebé?
</option>
<option value="bebesobesos.htm">Ahora, también bebés obesos
</option>
<option value="lavozdelamadre.htm">La voz de la Madre
</option>
<option value="masajeinfantil.htm">Apuntes de masaje infantil
</option>
<option value="asfisia.htm"> ¿Cómo evitar la axfisia?
</option>


<option value="convulsionesfebriles.htm">¿qué son las convulsiones febriles?
</option>

<option value="fontanela.htm">La fontanela de los recién nacidos
</option>
<option value="tablapesos.htm">Tabla de peso y altura de los bebés
</option>
<option value="desarrollo.htm">Desarrollo psicológico del niño de 1 a 10 años
</option>
<option value="crecerconcuentos.htm">Crecer con el cuento
</option>
<option value="dientessanos.htm">Dientes Sanos
</option>
<option value="alimentacion.htm">Alimentación Infantil, comparación de la leche materna y de vaca
</option>
<option value="mamascanguro.htm">Mamás canguro
</option>




<option value="amamantarobiberon.htm">Amamantar o Biberón
</option>
<option value="todosobremibebe.htm">Todo sobre mi bebé, guía práctica de Consumer.es
</option>

<option value="rosacea.htm">Rosácea ocular en niños y tratamiento temprano
</option>
<option value="labioleporino.htm">El labio leporino se da más en hijos de mujeres que fumaron durante el embarazo
</option>

<option value="dormirautos.htm">Alertan por los riesgos de dejar dormir a los bebés en "sillitas" para autos
</option>
<option value="nuevamusicabebes.htm">La nueva música para los bebés
</option>


<option value="amamantar.htm">50 razones para amamantar a tu bebé
</option>
<option value="gafas.htm">Pequeños con una ayuda que se ve muy bien
</option>

<option value="lactanciavision.htm">La lactancia mejora la visión infantil
</option>

<option value="elabcdelalactancia.htm">El ABC d la lactancia
</option>

<option value="ciclossueno.htm">Los Ciclos del Sueño
</option>




<option value="comercolores.htm">Aprender a comer con los colores
</option>


<option value="sobreprotegidos.htm">Los niños sobreprotegidos sufren tando daño como los abandonados
</option>


<option value="ritual.htm">El ritual del sueño
</option>
<option value="jugarbebe.htm">¿Cómo jugar con el bebé? Desarrollo psicomotor
</option>


<option value="mamascanguro.htm">Mamás canguro
</option>

<option value="colores.htm">Los beneficios de los colores
</option>
</select>
<input type="button" name="ir" value="Mostrar Artículo" onclick="document.locatio"n="document.formulario2. formulario2.value">

</form>
El error que me da en el W3C es:

Validation Output: 8 Errors
lista de 10 elementos
Error
Line 125, Column 87: an attribute specification must start with a name or name token.…Artículo" onclick="document.location" ="document.formulario1.formulario1.value

An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that
you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new
attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).
Error
Line 125, Column 88: end tag for "input" omitted, but OMITTAG NO was specified.…rtículo" onclick="document.location"= "document.formulario1.formulario1.value…

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Info
Line 125, Column 4: start tag was here. <input type="button" name="ir" value="Mostrar Artículo" onclick="document.lo
Error
Line 226, Column 88: there is no attribute "n".…rtículo" onclick="document.locatio"n= "document.formulario2.formulario2.valu…

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this
element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the
"Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually
fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no
supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are
both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element
to incorporate flash media in a Web page, see the
FAQ item on valid flash.
Error
Line 226, Column 129: end tag for "input" omitted, but OMITTAG NO was specified.…ument.formulario2.formulario2.value" >

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Info
Line 226, Column 4: start tag was here. <input type="button" name="ir" value="Mostrar Artículo" onclick="document.lo
Error
Line 125, Column > 80: XML Parsing Error: attributes construct error.…ostrar Artículo" onclick="document.location"="document.formulario1. formulario…

Error
Line 125, Column > 80: XML Parsing Error: Couldn't find end of Start Tag input line 125.…ostrar Artículo" onclick="document.location"="document.formulario1. formulario…

Error
Line 226, Column > 80: XML Parsing Error: attributes construct error.…ostrar Artículo" onclick="document.locatio"n="document.formulario2. formulario…

Error
Line 226, Column > 80: XML Parsing Error: Couldn't find end of Start Tag input line 226.…ostrar Artículo" onclick="document.locatio"n="document.formulario2. formulario…

final de lista


Muchas gracias
  #2 (permalink)  
Antiguo 09/03/2008, 13:48
AlvaroG
Invitado
 
Mensajes: n/a
Puntos:
Re: validar menús desplegables en el W3C

1.- NO pegues todo el código si tenés claramente indicada la línea en donde está el error.
2.- Tenés un error grave de sintaxis:

onclick="document.location"="document.formulario1. formulario1.value"

debería ser

onclick="document.location=document.formulario1. formulario1.value"

Salú
  #3 (permalink)  
Antiguo 09/03/2008, 14:13
 
Fecha de Ingreso: marzo-2008
Mensajes: 5
Antigüedad: 16 años, 1 mes
Puntos: 0
Re: validar menús desplegables en el W3C

Cita:
Iniciado por alvlin Ver Mensaje
1.- NO pegues todo el código si tenés claramente indicada la línea en donde está el error.
2.- Tenés un error grave de sintaxis:

onclick="document.location"="document.formulario1. formulario1.value"

debería ser

onclick="document.location=document.formulario1. formulario1.value"

Salú
Muchas gracias, todo perfecto. No conocia el elemento onclick y no sabía que podia ser el fallo.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:29.