[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[vtp-dev] Problem with use of array in scripting
|
Hello,
I've a question about the use of script module. When I use an array of string, I was unable to
affect the value of the variable tabtmp to the variable tab. I've declared the variable tab as an array of String.
When I display the value of the variable tabtmpstring, it contains "titi|tutu|toto".
However, when I display the value of the variable tabstring, I've "undefined|undefined|undefined".
This array has the good dimension but didn't contain the value.
Do you have an example to affect a value to this tab ?
---------------------------------------------------------------------------------------------
Variables.tabtmpstring = "";
Variables.tabtring = "";
var tabtmp = new Array();
tabtmp[0] = "titi";
tabtmp[1] = "tutu";
tabtmp[2] = "toto";
for (var i=0; i<3; i++){
Variables.tabtmpstring += '|' + tabtmp[i];
}
Variables.tab = tabtmp;
for (var j=0; j<3; j++){
Variables.tabstring += '|' + Variables.tab [j];
}
---------------------------------------------------------------------------------------------
Regards, Laurent.