Re: Getting a JS confirmation when uploading via Ajax

2009-06-24 Thread Michael Sparer

I hope you're aware of the fact that File transfer by means of ajax won't
work and you're using something like an iframe.
to get rid of the confirmation, add the following:

add(new HeaderContributor(new IHeaderContributor() {

private static final long serialVersionUID = 1L;

public void renderHead(final IHeaderResponse response) {

response.renderOnDomReadyJavascript(Wicket.Window.unloadConfirmation =
false;);
}
}));

regards,
Michael

HHB wrote:
 
 Hey,
 I'm uploading a file via Ajax, I literally copied the 
 Wicket sample application.
 The uploading form is included in a modal window.
 Upon clicking on the upload button, I got a JavaScript dialog:
 ++
 Are you sure you want to navigate from this page?
 Reloading this page will cause the modal window to disappear.
 Press Ok to continue, or Cancel to stay on the current page.
 ++
 Why I'm getting this JavaScript confirmation dialog?
 Is there a way to get ride of it?
 Thanks.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


-
Michael Sparer
http://techblog.molindo.at
-- 
View this message in context: 
http://www.nabble.com/Getting-a-JS-confirmation-when-uploading-via-Ajax-tp24167696p24186854.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Getting a JS confirmation when uploading via Ajax

2009-06-23 Thread HHB
Hey,
I'm uploading a file via Ajax, I literally copied the 
Wicket sample application.
The uploading form is included in a modal window.
Upon clicking on the upload button, I got a JavaScript dialog:
++
Are you sure you want to navigate from this page?
Reloading this page will cause the modal window to disappear.
Press Ok to continue, or Cancel to stay on the current page.
++
Why I'm getting this JavaScript confirmation dialog?
Is there a way to get ride of it?
Thanks.


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