Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/08/2011, 15:20
Avatar de PabloPF
PabloPF
 
Fecha de Ingreso: mayo-2011
Ubicación: Ciudadano de un lugar llamado mundo!
Mensajes: 137
Antigüedad: 12 años, 11 meses
Puntos: 5
Problema al validar un form en W3C

Hola, tengo el siguiente código:
Código HTML:
Ver original
  1. <form style="margin-top: 20px; margin-bottom: 5px;" name="send" action="this.html" method="post">
  2.         <input type="text" name="Nombre" value="Nombre" class="inputsss" onfocus="this.className='inputs-coments-over';if (this.value == 'Nombre') {this.value = '';}" onblur="this.className='inputs-coments';if (this.value == '') {this.value = 'Nombre';}" />
  3.  
  4.         <input type="text" name="email" class="inputsss" value="Correo electrónico"  onfocus="this.className='inputs-coments-over';if (this.value == 'Correo electrónico') {this.value = '';}" onblur="this.className='inputs-coments';if (this.value == '') {this.value = 'Correo electrónico';}" />
  5.         <input type="text" name="tipo" class="inputsss" value="Escribe el motivo..."  onfocus="this.className='inputs-coments-over';if (this.value == 'Escribe el motivo...') {this.value = '';}" onblur="this.className='inputs-coments';if (this.value == '') {this.value = 'Escribe el motivo...';}" />
  6.    
  7.                 <textarea name="comentario" class="inputs-coments" cols="30" rows="8" value="Escribe el comentario..."  onfocus="this.className='inputs-coments-over';if (this.value == 'Escribe el comentario...') {this.value = '';}" onblur="this.className='inputsss';if (this.value == '') {this.value = 'Describe el problema...';}">Describe el problema...</textarea><div style="clear:both; text-align: left; margin-left: 55px;">
  8.               <input name="acept" value="si" type="checkbox" /><span style="text-aling: left; font-size: 12pt; color: #666;"> Acepto los <a onclick="this.target='_blank'" href="terms.html">terminos de uso</a>. </span></div>
  9.                         <input type="submit" name="send" style="width:100px;" tabindex="6" value="Enviar" />
  10.  
  11.     </form>
y en el W3C, al validar me salen estos fallos:

1:there is no attribute "name"

…gin-top: 20px; margin-bottom: 5px;" name="sendreport" action="/" method="post">


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.

2:document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag

…'inputs-coments';if (this.value == '') {this.value = 'Correo electrónico';}" />


The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

como soluciono el problema, gracias!
__________________
no hay justicia si la guerra esta justificada