
En fin, tengo un problema:
Estoy haciendo una web en la que se deben mostrar imágenes aleatorias con link a la misma imagen en grande.
Para lograr el random, generé una funcion en javascript que devuelve un numero random, y ese numero es usado como nombre de la imágen en cuestión:
Código :
nroImg = imgRand(27); document.write('<a href="multimedia/images/'+nroImg+'.jpg" target="_blank"><img src="multimedia/images/thumbs/'+nroImg+'.jpg" alt="" /></a>');
anda perfecto, pero la cuestión es que no me valida el xhtml y no sé que es lo que estoy haciendo mal
(y soy una loca de la validación, no soporto tener una página inválida

dice:
…mages/'+nroImg+'.jpg" target="_blank"><img src="multimedia/images/thumbs/'+nr
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
uso XHTML 1.0 Transitional
y bueno, no entiendo cual es el problema

si pudieran darme una mano para guiarme se los agradeceré

saludos a todos!!