Rodrigo
You need to use the fireEvent() function so your onChange would be
<select name="ColumnName"
onchange="$('ItemEditFormID').fireEvent('submit');">
Steve
-----Original Message-----
From: Rodrigo [mailto:[email protected]]
Sent: Thursday, 30 July 2009 12:50 PM
To: MooTools Users
Subject: [Moo] submit event not caught using
onchange="$('formID').submit();"
I have the following script:
$('ItemEditFormID').addEvent('submit', function(e) {
e.stop();
this.set('send', {
onComplete:
function(response) {
$('panel1').set('html', response);
}
});
// Send the form.
this.send();
});
And the following form:
<form id="ItemEditFormID" method="post" action="/MyLocalv2/Dashboard/
filters/filterItemEditPopulate.cfm">
<select name="ColumnName" onchange="$('ItemEditFormID').submit();">
<option value="etc">etc</option>
</select>
<input type="submit" value="save" />
</form>
Whenever I click the "submit" button, the form submission is stopped
via e.stop();
But if I change the select (triggering the onChange event), the
submission is not stopped.
Is there a different way of stopping a submission event when triggered
by an onChange?
Thx
Rodrigo