Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dojo populatig drop down before request comes from the server

 
Darvesh Niz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic