Ciao, ho appena iniziato a programmare in Javascript/DOM e tanto per iniziare mi piacerebbe realizzare un script molto semplice, che al click su un link renda visibile un immagine e ne cambi il src.

ecco il mio codice:

Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
title>prova</title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<
script type="text/javascript">

function 
boxpreview() {
    var 
document.getElementById("box_preview");
    
e.setAttribute("src""images/4.jpg");
    
e.setAttribute("style""display: inline;");
}


</script>

</head>
<body>



[*][url="#"]Nox[/url]


[img]images/2.jpg[/img] 


</body>
</html> 
il problema è che funziona su Safari e Firefox ma non su Explorer per PC...cos'è che sto sbagliando?

grazie mille!

Augusto