Known Issues for yui button widget
YAHOO.widget.Button.addHiddenFieldsToForm(document.buttonexampleform);
Button name and value pairs missing from form data when the form is submitted via its submit method.
As noted in the section above titled Using Button with HTML forms, each Button Control listens for the "submit" event of its parent form and will create a hidden field representing its name and value in response to the firing of that event to ensure the form's data set is accurate when the form is submitted. When submitting a form via JavaScript using the form's submit method, it is necessary to call YAHOO.widget.Button.addHiddenFieldsToForm (passing in a reference to the form to be submitted) beforehand. This is due to the fact that calling a form's submit method does not fire the form's "submit" event and a Button instance has no way to automatically append the necessary hidden field representing its name and value.
沒有留言:
張貼留言