This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Dojo populatig drop down before request comes from the server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Dojo populatig drop down before request comes from the server" Watch "Dojo populatig drop down before request comes from the server" New topic
Author

Dojo populatig drop down before request comes from the server

Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
Hi
i have a seelct box for state , if some one select state the next drop down should have cities populated. My code is very simple. This is my java script function. i get the value of state and teh server senda back || delemited values for cities which i used in populateCities call back method.


The issue is the code works fine wehn i have a break point in the java code, and the cities are populated correctly, but when i use the run mode looks like the call back function is called before the request comes back from the server. i kind of remember where we can check if the request is completed then only go to the call back method. Any help with this
Thanks
Rashid
[ September 10, 2008: Message edited by: rashid NIzamuddin ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the .


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

Originally posted by rashid NIzamuddin:
i kind of remember where we can check if the request is completed then only go to the call back method.
Dojo should be handling that for you. Are you sure that Dojo's invoking your callback before the response is returned? Have you used tools like Firebug to inspect the Ajax activity?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dojo populatig drop down before request comes from the server