Sorry for the double topic, I've spent ages trying to figure this out and a search yields no results
I'm using
this and I've got everything working and modified to my needs; The script and php communicate and it executes perfectly, but as soon as I try to do the following:
jscript code:
return xmlhttp.responseText;
It errors with
quote:
Error: The data necessary to complete this operation is not yet available.
(code: -2147483638)
Now, I presume this means it's not had chance to retrieve the data yet? How do I allow it to?
jscript code:
xmlhttp.send(data);
Has already been called, however it doesn't appear to be able to echo out the received text? Am I doing something ridiculously wrong, or is this a deficiency I'll have to deal with?
EDIT:
Thinking about it, the page will take around 0.02 to process, which is too slow for the script, how can I tell it to wait until the page is loaded? That appears to be the problem.
Oh wait, I have an idea.
While xmlhttp.status != 200 wait, then when it is == 200 execute the function? Seems the only way to do it, then I can run a variable tally whilst the while loop is going and if it goes for too long it timesout?
*thinking out loud*
EDIT:
I got that to work; it doesn't. I got the script to pause for 5 seconds and it still didn't collect the data and the php processes in ~0.02 - So, problem with my script it appears.