Some additional details. I've been mainly tinkering in application.js in the enableSingleSubmit section. One of the things we do when singleSubmit is enabled is to add some event listeners to the form:
if (f.addEventListener)
{
//events for most browsers
f.addEventListener('blur', submitForm, false);
f.addEventListener('change', submitForm, false);
}
else
{
//events for IE
f.attachEvent('onfocusout', submitForm);
f.attachEvent('onclick', submitForm);
}
Triggering the submit on the change event works nicely in IE9 and the other browsers for most "select-*" type use cases but there is no onchange attached for pre-IE9 browsers. I tried attaching it myself using a couple of different techniques:
f.attachEvent('onchange', submitForm);
f.onclick = submitForm;
but I never see the event. From what I'm reading, there's no straightforward way as the event doesn't bubble or get captured:
http://msdn.microsoft.com/en-us/library/ie/ms536912(v=vs.85).aspx
As it is, with IE 7/8, I currently have some manual code to check to see if the selection index and size of the selection have changed since the last interaction. Because of this, we need to rely on some combination of "click" and "focusout" for IE 7/8 in order to detect if something changed.
Some additional details. I've been mainly tinkering in application.js in the enableSingleSubmit section. One of the things we do when singleSubmit is enabled is to add some event listeners to the form:
{ //events for most browsers f.addEventListener('blur', submitForm, false); f.addEventListener('change', submitForm, false); }if (f.addEventListener)
else
{ //events for IE f.attachEvent('onfocusout', submitForm); f.attachEvent('onclick', submitForm); }Triggering the submit on the change event works nicely in IE9 and the other browsers for most "select-*" type use cases but there is no onchange attached for pre-IE9 browsers. I tried attaching it myself using a couple of different techniques:
f.attachEvent('onchange', submitForm);
f.onclick = submitForm;
but I never see the event. From what I'm reading, there's no straightforward way as the event doesn't bubble or get captured:
http://msdn.microsoft.com/en-us/library/ie/ms536912(v=vs.85).aspx
As it is, with IE 7/8, I currently have some manual code to check to see if the selection index and size of the selection have changed since the last interaction. Because of this, we need to rely on some combination of "click" and "focusout" for IE 7/8 in order to detect if something changed.