I have a hidden form field, and when the button is pressed, the value of the hidden field changes now, I have added a supervisor in the hidden area, listening to change, however, for some reason, the event listener never kicks, even if the value of the hidden element changes. I am using prototype and Firefox 3.6.
The code looks roughly like this:
button.observe ('click', function (event) {hiddenField.setValue (some value);}); HiddenField.observe ('change', function (event) {warning ('this works!');});
Is there any clue why the successor does not execute?
Thank you!
you
event needs fire ..
< Pre> button. Promotion ('click', function (event) {HiddenField.setValue (someValue); hiddenField.Simulate ('change');});
and then follow it:
hiddenAffield .observe ('change', function (event) {warning ('this works!') ;});
Comments
Post a Comment