Possible Duplicate:
Trigger an event with Prototype
example, 3 onclick events in javascript/prototype. How to force prototype to run alert functions for dump "first!", "second!" and then "third!" value. Thanks and here is code that you can c/p:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script>
</head>
<body>
<script type="text/javascript">
//<![CDATA[
document.observe("dom:loaded", function() {
$("go").observe("click", function() { alert('First!'); });
$("go").observe("click", function() { alert('Third!'); });
$("go").observe("click", function() { alert('Second!'); });
});
//]]>
</script>
<form>
<input id="go" type="button" value="Click me!" />
</form>
</body>
</html>