OnChangeAjaxBehavior uses oninput/onpaste/oncut behind the scenes for
text form components, that's why it reacts on each key press
onchange fires only when you leave the input field

On Thu, Apr 19, 2012 at 5:40 PM, Tom Eugelink <t...@tbee.org> wrote:
>
> To take it one level further, if I add
>
>
>     onchange="javascript:alert('test');"
>
> to an input without and with an OnChangeAjaxBehavior:
>
> <div class="clearfix">
> <label>Renewal delay:
> <div class="input">
> <input type="text" size="10" wicket:id="renewalDelay"
> onchange="javascript:alert('test');"/>
> </div>
> </label>
> </div>
>
>
> <div class="clearfix" wicket:id="contextPanel">
> <label>Client:
> <div class="input">
> <input type="text" size="5" wicket:id="context.owner.id"
> onchange="javascript:alert('test');"/>
> </div>
> </label>
> </div>
>
> The last alert is displayed on every key press, the first after leaving the
> field. The behavior of the event is different.
>
> Tom
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to