RuneRelmer
January 29th, 2002, 02:08 PM
I load variables from a text file named :
&first1=John
&first2=Mark
&first3=Tim
&first4=Mike
I am evaluating them in a loop by constructing the variable I want to test and assigning it the value of first1, first2, etc. based on the current loop iteration
For Example, during iteration start_num=1 :
test_first = "first";
test_first = test_first.concat(start_num);
run_first = eval (test_first);
This makes the variable I want to test, run_test, and assigns it the value of, first1, which is John. So :
run_test=John
However, I am comparing, run_test, to a input from a text box, text_input. text_input is type string, but run_test is type undefined.
How do I convert the variable run_test to a string so I can evaluate it in an IF statement?
&first1=John
&first2=Mark
&first3=Tim
&first4=Mike
I am evaluating them in a loop by constructing the variable I want to test and assigning it the value of first1, first2, etc. based on the current loop iteration
For Example, during iteration start_num=1 :
test_first = "first";
test_first = test_first.concat(start_num);
run_first = eval (test_first);
This makes the variable I want to test, run_test, and assigns it the value of, first1, which is John. So :
run_test=John
However, I am comparing, run_test, to a input from a text box, text_input. text_input is type string, but run_test is type undefined.
How do I convert the variable run_test to a string so I can evaluate it in an IF statement?