Foros del Web » Creando para Internet » HTML »

validar la propiedad name de un image

Estas en el tema de validar la propiedad name de un image en el foro de HTML en Foros del Web. Hola a ver si alguien me puede ayudar a solucionar este error. mi codigo: <script type="text/javascript"> boton = new Array(4) boton[0] = new Image; boton[0].src ...
  #1 (permalink)  
Antiguo 15/01/2005, 12:16
 
Fecha de Ingreso: diciembre-2004
Mensajes: 371
Antigüedad: 19 años, 3 meses
Puntos: 0
validar la propiedad name de un image

Hola a ver si alguien me puede ayudar a solucionar este error.


mi codigo:
<script type="text/javascript">
boton = new Array(4)
boton[0] = new Image;
boton[0].src = 'menu/historia2.jpg';
esto sigue.......
</script>


<A href="" onmouseOver="document.name0.src=boton[0].src;" onMouseOut="document.name0.src='menu/historia1.jpg'"><img name="name0" src="menu/historia1.jpg" border="0" alt="Historia"></a>





al validarlo me da este error--->


Line 57, column 121: there is no attribute "NAME"

....src='menu/historia1.jpg'"><img name="name0" src="menu/historia1.jpg" border=

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.



¿como puedo corregir para ke no me de ese error?

Gasias.
  #2 (permalink)  
Antiguo 15/01/2005, 13:11
Avatar de tunait
Moderadora
 
Fecha de Ingreso: agosto-2001
Ubicación: Terok Nor
Mensajes: 16.805
Antigüedad: 22 años, 7 meses
Puntos: 381
El atributo name está desaprovado, en su lugar debes de usar id
  #3 (permalink)  
Antiguo 15/01/2005, 17:10
 
Fecha de Ingreso: diciembre-2004
Mensajes: 371
Antigüedad: 19 años, 3 meses
Puntos: 0
Sonrisa

Gracias por la ayuda.
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 08:29.