Ciao, ho un problema a usare l'evento onmouseout:
se passo col mouse sull'immagine più piccola, il div si chiude, mentre se rimango sull'immagine grande, il div rimane aperto, se tutte e due le immagini sono contenute nel div perchè se passo sulla seconda si chiude??
Codice PHP:
<html>
<body>
<script type="text/javascript">
a = document.createElement("div");
a.setAttribute("id", "map");
a.setAttribute("onmouseout", "document.body.removeChild(a);");
document.body.appendChild(a);
b = document.createElement("img");
b.setAttribute("src", "http://img254.imageshack.us/img254/4802/immagineesempiolf5.jpg");
b.setAttribute("width", "200");
b.setAttribute("height", "200");
document.getElementById("map").appendChild(b);
c = document.createElement("img");
c.setAttribute("src", "http://www.calshop.biz/diario/wp-content/uploads/2006/03/Unaltra%20immagine%20della%20procace%20testimonial.%20Suo%20nonno%20si%20chiama%20George%20Bush,%20ma%20nessuna%20parentela%20la%20lega%20con%20il%20presidente.jpg");
c.setAttribute("width", "30");
c.setAttribute("height", "50");
c.style.position="absolute";
c.style.left="20%";
document.getElementById("map").appendChild(c);
</script>
<input type="button" value="button" onclick="document.body.removeChild(a);" />
</body>
</html>