I'm working on a "simple" tracking system for a client that will be
receiving elearning packages from 3rd parties.
I'm intending to do the communication with the database using ajax.
My problem is one of concepts. An elearning package, of which I have no
control over, might have code that looks like this;
1: var val = GetValue("name");
2:
3: if (val) {
4: doThis();
5: } else {
6: doThat();
7: }
Line 1 would trigger an ajax call to the db but as the call is
asynchronous does that mean that at line 3 "val" may be undefined?
I'm still struggling with ajax concepts. I can understand how to, say,
update a database but simple things like getting a value into a variable
is escaping me.
Andrew Poulos