I've got two DTCs on my page. Ones a textbox the others a listbox. I want them to be dynamically named so I use the code below:
<%
IF i = 1 THEN
txtSkillID.name = txtSkillID.name & i
txtSkillID.id = txtSkillID.id & i
txtSkillID.value = SkillsRS.Fields("SkillID".Value
ELSE
txtSkillID.name = "txtSkillID" & (i)
txtSkillID.id = "txtSkillID" & (i)
txtSkillID.value = SkillsRS.Fields("SkillID".Value
END IF
%>
But i'm stuck on how to call them. At the moment i'm using:
IndScore = (("lsbScore" & i).getText(("lsbScore" & i).selectedIndex))
but i get:
Microsoft VBScript runtime error '800a01a8'
Object required: '[string: "lsbScore1"]'
when I try to run the code. Anyone any ideas where i'm going wrong?
"Life is like a Ferrari, it goes to fast.
But that's ok, because you can't afford it anyway" - Jim Davis (Garfield)
<%
IF i = 1 THEN
txtSkillID.name = txtSkillID.name & i
txtSkillID.id = txtSkillID.id & i
txtSkillID.value = SkillsRS.Fields("SkillID".Value
ELSE
txtSkillID.name = "txtSkillID" & (i)
txtSkillID.id = "txtSkillID" & (i)
txtSkillID.value = SkillsRS.Fields("SkillID".Value
END IF
%>
But i'm stuck on how to call them. At the moment i'm using:
IndScore = (("lsbScore" & i).getText(("lsbScore" & i).selectedIndex))
but i get:
Microsoft VBScript runtime error '800a01a8'
Object required: '[string: "lsbScore1"]'
when I try to run the code. Anyone any ideas where i'm going wrong?
"Life is like a Ferrari, it goes to fast.
But that's ok, because you can't afford it anyway" - Jim Davis (Garfield)