Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically named DTCs

Status
Not open for further replies.

AndyApp

Programmer
Dec 20, 2001
259
GB
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(&quot;SkillID&quot;).Value
ELSE
txtSkillID.name = &quot;txtSkillID&quot; & (i)
txtSkillID.id = &quot;txtSkillID&quot; & (i)
txtSkillID.value = SkillsRS.Fields(&quot;SkillID&quot;).Value
END IF
%>

But i'm stuck on how to call them. At the moment i'm using:

IndScore = ((&quot;lsbScore&quot; & i).getText((&quot;lsbScore&quot; & i).selectedIndex))

but i get:

Microsoft VBScript runtime error '800a01a8'

Object required: '[string: &quot;lsbScore1&quot;]'

when I try to run the code. Anyone any ideas where i'm going wrong?

&quot;Life is like a Ferrari, it goes to fast.
But that's ok, because you can't afford it anyway&quot; - Jim Davis (Garfield)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top