Comment recuperer dans une variable le texte affiché par le script PHP suivant "lo2.php" :
<?
$rep = opendir("audio" );
echo "tab=";
while($fichier = readdir($rep)) {
echo $fichier.",";
}
?>
On essaye de recup la chaine ou la liste avec LoadVars.
Quelqu'un saurait-il si ce ce script php renvoit une variable "tab" qui contient une chaine ou une liste, et sinon qu'est ce que ca renvoit precisément lorsque l'on invoque la methode onLoad de l'objet loadVars.
var myVars = new LoadVars();
myVars.onLoad = function(ok) {
if (ok) {
myArray = new Array();
myArray = myVars.tab;
for (var i = 0; i<myVars.myArray.length-1; i++) {
_root["txt"+i].text = myArray[i];
}
}
};
myVars.load("lo2.php" );
stop();