inaam
April 29th, 2003, 02:28 AM
I'm a beginner in coding javascript.
I am building a string where sboxname carries the select box name, the alert message displays the string correctly then I want to extract the value of the selected index and compare it within the If statement.
Any ideas how to do it, please?
sindex="document.form2."+sboxname+".selectedIndex";
alert("selected index string: "+sindex);
if(sindex==1)
I am building a string where sboxname carries the select box name, the alert message displays the string correctly then I want to extract the value of the selected index and compare it within the If statement.
Any ideas how to do it, please?
sindex="document.form2."+sboxname+".selectedIndex";
alert("selected index string: "+sindex);
if(sindex==1)