[Débutant] Popup avec javascript dans un fichier séparé
	
	
		Bonjour à tous,
Je veux séparer le javascript du code xHTML. Par conséquent, j'ai créé un fichier .xhtml et un autre .js. Cependant, je n'arrive pas à ouvrir de popup.
	Code:
	
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 
 | <!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" xml:lang="fr" >
    <head>
        <title>Test</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<script type="text/javascript" src="script.js"></script>
    </head>
 
   <body>
		<a href="#" id="popup"><img src="test.jpg" alt="test"></a>
   </body>
</html> | 
 
	Code:
	
document.getElementById('popup').onClick="window.open('image.jpg','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0');return(false)"
 
Comment faire ?
Merci d'avance,
Marco85