You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment Agility won't include the root element of a view in the event selector (this behavior can be traced back to jQuery), so the controller submit form doesn't pick up any element.
To get around it, you can either explicitly select the root element with submit & (see http://agilityjs.com/docs/docs.html#events-dom), or create a dummy root element for your view so that the form selector is picked up by jQuery:
I can't seem to setup an event listener for the submit event on a form. See example below...
var searchbar = $$({
model:{},
view:{
format:
'
',
style:
'& input[type="search"] {width:70%;}
& input[type="submit"] {width: 10%;}'
},
controller:{
'submit form': function(){
alert(16);
}
}
});
$$.document.append(searchbar);
The text was updated successfully, but these errors were encountered: