Roundup Tracker - Issues

Message4802

Author rouilj
Recipients rouilj
Date 2013-02-23.23:33:34
Message-id <1361662414.74.0.80449659755.issue2550796@psf.upfronthosting.co.za>
In-reply-to
The current code for calendar and the classhelp "widgets" can change
an input field, but they don't trigger the field's onchange
event.

http://stackoverflow.com/questions/2856513/trigger-onchange-event-manually

recommends one method by adding:

if ("fireEvent" in element)
    element.fireEvent("onchange");
else
{
    var evt = document.createEvent("HTMLEvents");
    evt.initEvent("change", false, true);
    element.dispatchEvent(evt);
}

to force the function that does the change to the field to trigger
the onchange event. This should probably be done in pure javascript
and not reply on any particular javascript libs like jQuery.

I noticed this because the templates I am designing have onchange
events that change the background color of the label to indicate that
the form has been changed so people don't forget to commit their changes.
History
Date User Action Args
2013-02-23 23:33:34rouiljsetrecipients: + rouilj
2013-02-23 23:33:34rouiljsetmessageid: <1361662414.74.0.80449659755.issue2550796@psf.upfronthosting.co.za>
2013-02-23 23:33:34rouiljlinkissue2550796 messages
2013-02-23 23:33:34rouiljcreate