<!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>Events !</title>
<script type="text/javascript">
window.onload = function() {
document.getElementById('anImage').addEventListener('click', function() { alert('F-15 Tomcat'); }, false);
document.getElementById('anImage').addEventListener('click', function() { alert('F-15 Tomcat again !'); }, false);
document.getElementById('anImage').addEventListener('click',
function() { Alert; },
false);
}
function Alert() {
alert('This is a Two Seater Aircraft .... !')
}
</script>
<style type="text/css">
#anImage
{
height: 275px;
width: 357px;
}
</style>
</head>
<body>
<img src="1012562.jpg" id="anImage" />
</body>
</html>
The Alert function is not being called in the third event .... !
Could anyone tell me what is wrong or a better way to call that function ????
Thanx