I am using ajax to populate some combo boxes. Each relies on the other values. I found one box value could be used to populate two boxes. However, it appeared that the two calls overlapped and the resulting boxes where populated with the second finishing ajax call.
Wasn't there a way to make an ajax call block other javascript calls until it had finished what it was doing? Just for kicks: How 2 do it?
You look at the true/false argument in the open method.
It would be better to code it so you would not run into this problem. OO JavaScript is the way to go.
Eric
graham king
Ranch Hand
Joined: Dec 30, 2004
Posts: 133
posted
0
Originally posted by Eric Pascarello:
It would be better to code it so you would not run into this problem. OO JavaScript is the way to go.
Eric, is there anyway you could give me an example of this?
raying:
Graham
graham king
Ranch Hand
Joined: Dec 30, 2004
Posts: 133
posted
0
Need a refresher on the whole JavaScript paradigm. I had forgotten that a variable declared without the var signa automatically becomes a global variable. So, the onchange event was actually using the same request object and terminating with wichever finished first. Silly me. By changing the name of the declared variable I was able to get the desired results.
[ December 01, 2006: Message edited by: graham king ]