I tried that but it doesn't seem to work. What happens is that once the file on
the server has changed then the variables will seem to have the right values,
but in fact the variables haven't been updated.
the code is simple, because it's really just a test of the keywords
functionallity. I set some variables to a value. Send it to the PHP script.
change the variables then download them again to see if I get the original
values.
Vars = new LoadVars();
Vars.onLoad = function(success) {
if (success) {
portTxt.text = "x = "+Vars.x+", y = "+Vars.y;
}
};
Vars.x=50
Vars.y=165
Vars.send("Vars.php", "", "POST");
Vars.x=0
Vars.y=0
nerkette - 23 Jun 2004 21:05 GMT
With the LoadVars.send method, If the target parameter is specified, the
server's response is displayed in the browser frame window named target. If the
target parameter is omitted, the server's response is discarded.
Since you are only using send, your response is being omitted.
You may want to try this code instead
Vars.sendAndLoad("Vars.php", "", "POST");
It is supposed to send your variables, and then load the updated variables
back into the specified object so you can retrieve them again.