Message4802
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. |
|
Date |
User |
Action |
Args |
2013-02-23 23:33:34 | rouilj | set | recipients:
+ rouilj |
2013-02-23 23:33:34 | rouilj | set | messageid: <1361662414.74.0.80449659755.issue2550796@psf.upfronthosting.co.za> |
2013-02-23 23:33:34 | rouilj | link | issue2550796 messages |
2013-02-23 23:33:34 | rouilj | create | |
|