Hi Timo,

thanks for your reply.



> Anyway, if your intent to only validate when the textfield 
> loses focus? If it would be OK to validate on each keypress,
> you could try using OnChangeAjaxBehavior in the TextField.
> 
We are doing validation via Ajax, so we decided to not to validate on each
key press because of performance issues.



> Another possibility would be to disable the submit button 
> until the validation does not pass -- but then if you want
> to click the button directly when the focus is still on the
> field, it gets kind of clumsy.
> 
This would also mean, that the user first has to leave a text field (to
trigger validation) before she could submit the form.



> And yet another possibility is to add the extra check in 
> the Button event handler... and just run the validation 
> manually from there before submit if needed.
> 
We are doing validation on each text field to give feedback as soon as
possible, so this is not an option.


Timo Rantalaiho wrote:
> 
> Are you sure that it always works in Firefox? Sounds like it 
> could be a race condition. People who know Javascript and 
> HTML better than me have told me that the browser event 
> model is not too well defined.
> 
> Anyway, if your intent to only validate when the textfield 
> loses focus? If it would be OK to validate on each keypress,
> you could try using OnChangeAjaxBehavior in the TextField.
> 
> Another possibility would be to disable the submit button 
> until the validation does not pass -- but then if you want
> to click the button directly when the focus is still on the
> field, it gets kind of clumsy.
> 
> And yet another possibility is to add the extra check in 
> the Button event handler... and just run the validation 
> manually from there before submit if needed.
> 
> Best wishes,
> Timo
> 
> -- 
> Timo Rantalaiho           
> Reaktor Innovations Oy    <URL: http://www.ri.fi/ >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JavaScript-onChange-after-onClick-tp18467010p18481468.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to