Question
LoadVars in a custom class
Hi
What I need is basicly the following: A function, that sends a query to PHP and returns the result.
What I have done so far is using LoadVars to send the query, and it is executed correctly since I can see the result in the database. The result is saved from the onLoad-function to a global variable. The problem is that the function, in which I use LoadVars, returns before onLoad has executed, and thus can't return the result of the query.
Is there any way I can get my function to wait for the onLoad to complete?
I have tried the dirty solution and made a simple while-loop, that runs while the loaded-variable is false, but that only causes it to lock up, and it never seem to get to the onLoad-function.
I have attached the code i am are using.
To sum up, what I need is a function, that can send a query to PHP and return a result.
Thanks in advance for any help
What I need is basicly the following: A function, that sends a query to PHP and returns the result.
What I have done so far is using LoadVars to send the query, and it is executed correctly since I can see the result in the database. The result is saved from the onLoad-function to a global variable. The problem is that the function, in which I use LoadVars, returns before onLoad has executed, and thus can't return the result of the query.
Is there any way I can get my function to wait for the onLoad to complete?
I have tried the dirty solution and made a simple while-loop, that runs while the loaded-variable is false, but that only causes it to lock up, and it never seem to get to the onLoad-function.
I have attached the code i am are using.
To sum up, what I need is a function, that can send a query to PHP and return a result.
Thanks in advance for any help
