I have numerous ajax calls throughout my app, and they work fine in
both FF and IE.  However, there is one that behaves differently in IE
and FF.  It seems that the "onchange" behavior of a checkbox happens
at different times between the browsers.  With FF, the event is sent
as soon as the checkbox is checked.  In IE, it isn't sent until the
user clicks off the checkbox somewhere else on the page.

How do I get IE to behave the same as FF?  I want the call to be made
as soon as the user clicks onto the checkbox.  Is there a solution?

It probably doesn't matter, but just in case, here is the code:

CheckBox cb = new CheckBox("scheduled",new
        PropertyModel(rr.getAvailability(),"scheduled"));
cb.add(new AjaxFormComponentUpdatingBehavior("onchange") {
    @Override
    protected void onUpdate(AjaxRequestTarget target) {
        // Model is changed automatically
        target.appendJavascript("toggleSelection(document.getElementById('"+
            getComponent().getMarkupId()+"'))");
    }
});
add(cb);

The backing model rr.getAvailability is a Hibernate entity.  When the
checkbox is checked or unchecked, the boolean property "scheduled" is
changed in the entity and automatically persisted to the DB.

Thanks!
Tauren

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to