- Feb 3, 2009Hi Hans,
I don't see the behavior you refer to with the following example, which has a file input field, a text input field, a native HTML submit button and a YUI button labeled "Submit", which invokes Dialog's submit method:
Hitting enter when the text input field has focus (which will result in a form submission on most browsers, for forms containing only 1 text input field), invokes the Upload callback handler. Clicking the native submit button, or the Dialog's submit button do the same.
Dialog has code which will listen for anything causing a native form submission (such as hitting enter, or clicking a native HTML submit button) and route the form submission through it's configured postmethod (async XHR submission in the above case).
If you can post a test page, we can take a look at it.
Sent: Saturday, January 31, 2009 10:26 AM
It appears that there is different behavior between pressing enter and
clicking submit for a Dialog based form. It's most notable when there's a
For example, when a user actually clicks Submit, both the success and upload
callbacks are called. When a user simple hits enter, only the upload
callback is called.
Is there a way to change this behavior so that it's more reliable. Or at a
minimum a way to know if the success callback has fired, so that code in
both places isn't executed twice.
Hans Zaunere / Managing Member / New York PHP
www.nyphp.org / www.nyphp.com
- << Previous post in topic