mootools many buttons with one function to handle
- by Roby
i want to create a button list like
<form id="form">
<input type="button" value="skip">
<input type="button" value="continue">
<input type="button" value="bla">
<input type="button" value="blubb">
</form>
and want to post this via a request to a php script witch should get somethink like
button "skip" was clicked.
but i dont want to make a function for every button.
one function for all button.
i think it should work with the mootools relay function.
$('form').addEvent('click:relay(type=button)', function(){
alert(this.value);
});
or somethink like this ? :-/ hopefully someone could help me