Selecting a Transfer Code from the menu doesn't trigger the text box's onChange event

Issue #1 resolved
Erik Gillespie created an issue

Even though selecting a Transfer Code from the menu places the appropriate text in the current line's Transfer Code text box, a subsequent button click that posts the timecard form will cause the text box to be cleared out.

This happens because there is an onChange event associated with every Transfer Code text box that saves the value off into a different field (as well as triggering visual feedback that the text field changed).

When the text field is populated by the extension, it should also trigger the text box's onChange event so that the selection will be persisted if the page is reloaded due to a form submission.

Comments (3)

  1. Erik Gillespie reporter

    jQuery's methods for firing events didn't work here. The actual element had to be issue a generated event to simulate changing the textbox in order for all of the JavaScript coded directly in the HTML element's onchange attribute to be executed.

  2. Log in to comment