an extra unwanted in array
Hello, i have this issue that the values from an external page are loading but there seems to be an extra value in the array and i can't get rid of it. I'm loading values with the loadVariablesNum and the values are in this format from the page loading from:
&output1=Currie Palace,&output2=take out,&output3=132 street west,&output4=3OjaOOp_0TrluOjjFGwJmd4pRQs-,&output5=9-5pm,&output6=happy hour after 5,&output7=321-3214,&output8=additional1,&output9=additional2,&output10=page222.asp,&Counter=1
on a later frame in the movie i check to see if Counter == 1 and if so move on to display the string in a text box. When i display it in the text box the string is intrepreted & displayed correctly but under the string is blank spaces, i tested the interpretation of the string with the word 'Phone:' like so:
info.htmlText += "<font size=\"13\"><b>Phone: </b>"+ phone_array +"</font><br>";
and the text box displayed the value of phone in the string but when the array goes on to the next value set (in this case there is none, but i happens regardless of more that 1 value) anyway the array goes on to display another set with empty values.
So the text box looks like so just with the phone_array
Phone: 321-3214
Phone:
Why do i get a duplicate Phone when there is only 1 value in the array. This is the script i'm using to display in the text box called "info":
phone_length = phone_array.length;
phone_array = output7.split(","
;
for (i=0; i<rname_length; i++) {
info.htmlText += "<font size=\"13\"><b>Phone: </b>"+ phone_array +"</font><br>";
}
produces:
Phone: 321-3214
Phone: <--- why an extra?
as you can see in the string output7=321-3214, there are no other values. How can i fix it so that the array doesn't display an extra in the text box?
Hello, i have this issue that the values from an external page are loading but there seems to be an extra value in the array and i can't get rid of it. I'm loading values with the loadVariablesNum and the values are in this format from the page loading from:
&output1=Currie Palace,&output2=take out,&output3=132 street west,&output4=3OjaOOp_0TrluOjjFGwJmd4pRQs-,&output5=9-5pm,&output6=happy hour after 5,&output7=321-3214,&output8=additional1,&output9=additional2,&output10=page222.asp,&Counter=1
on a later frame in the movie i check to see if Counter == 1 and if so move on to display the string in a text box. When i display it in the text box the string is intrepreted & displayed correctly but under the string is blank spaces, i tested the interpretation of the string with the word 'Phone:' like so:
info.htmlText += "<font size=\"13\"><b>Phone: </b>"+ phone_array +"</font><br>";
and the text box displayed the value of phone in the string but when the array goes on to the next value set (in this case there is none, but i happens regardless of more that 1 value) anyway the array goes on to display another set with empty values.
So the text box looks like so just with the phone_array
Phone: 321-3214
Phone:
Why do i get a duplicate Phone when there is only 1 value in the array. This is the script i'm using to display in the text box called "info":
phone_length = phone_array.length;
phone_array = output7.split(","
for (i=0; i<rname_length; i++) {
info.htmlText += "<font size=\"13\"><b>Phone: </b>"+ phone_array +"</font><br>";
}
produces:
Phone: 321-3214
Phone: <--- why an extra?
as you can see in the string output7=321-3214, there are no other values. How can i fix it so that the array doesn't display an extra in the text box?