ciao,
grazie per la risposta. Se in una pagina html scrivo:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="functiononload.js">
</script>
</head>
<body>
<div id="templateimage" style="width:200px; height:200px; background-color:#999999;">
miao
<div>
</body>
</html>


il contenuto del file functiononload.js è:


function init() {
miao = document.getElementById('templateimage');
miao.onclick = alert('ciao');
}
window.onload = init;


Dovrei ottenere che quando clicco con il mouse sul blocco parta l'avviso, ma questo non succede...
dove sbaglio?