try overriding @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() {
private static final long serialVersionUID = 1L; @Override public CharSequence decorateScript(final CharSequence script) { return "alert('foobar');" + script; } }; } instead of getEventHandler regards, Michael Federico Fanton wrote: > > Hi everyone! > I have a Button that shows a JS alert and then executes an AJAX call. > It works fine under Firefox 2, but fails under IE7.. The alert appears, I > click "ok" and then I get the "Initiating Ajax GET request..." inside > "WICKET AJAX DEBUG", but it doesn't reach my serverside handler.. > Here's the code: > > Button button = new Button("btn"); > button.add(new AjaxEventBehavior("onclick"){ > > @Override > protected void onEvent(AjaxRequestTarget target) { > System.out.println("Ajax call works"); > } > > @Override > protected CharSequence getEventHandler() { > return "alert('Press OK and check server > log');"+super.getEventHandler(); > } > }); > add(button); > > > So basically, with IE7 after the alert there's no "Ajax call works" in the > serverside log.. Everything is OK with FF2. > Am I doing something wrong? Should I open a JIRA issue? (I have a > quickstart ready) > Many thanks for your attention! > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > ----- Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Button-with-confirmation-with-IE7-tp18944137p18945992.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]