File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes GWT and the fly likes Window.alert cannot be launched after making an ajax call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Window.alert cannot be launched after making an ajax call" Watch "Window.alert cannot be launched after making an ajax call" New topic
Author

Window.alert cannot be launched after making an ajax call

Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 207
Hi,

I am trying to display a status after making an ajax call, the following is the code fragment.

submitButton.addClickHandler(new ClickHandler() {

public void onClick(ClickEvent event) {
// TODO Auto-generated method stub;
for(int i = 0 ; i < ageBoxes.length ; i++) {
ageBoxes[i].validate(); //ajax call
}

Window.alert("Finished!");
}

});

submitButton is a button. ageBoxes is an array of TextBox. When the submit button is clicked, this click handler will be triggered and make ajax call(validate) for all the TextBox. The ajax call can be triggered successfully, however, the Window message box cannot be launched for some reasons.

Can anyone give me ideas why the message box cannot be popped up after making a series of ajax call?


Thanks
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

Do you get any errors? Did you try running in a debugger? Did you try using printf statements before and after the Window.alert call?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Window.alert cannot be launched after making an ajax call
 
Similar Threads
Dropdown
Ajax & Myfaces problem - pages reloads with commandButton.
problem with simple gwt app
How do i create dynamic input fields after click a button?
jQuery ajax request and 302 status code