by Steve Fleming (1 Submission)
Category: Active Server Pages
Compatability: ASP (Active Server Pages)
Difficulty: Unknown Difficulty
Originally Published: Tue 20th June 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Takes data from a field in a database record, for example the field named Size, the data contained is [Small;Medium;Large;XL;XXL;XXXL] - the
'THIS CODE IS (C)2000 BY STEVE FLEMING
'
'
Dim SizeArray
Dim SizeResult
Dim SizeTestVar
SizeTestVar = FP_FieldVal(fp_rs,"Size")
If Asc(SizeTestVar) = 38 then
'<---YOU CAN MAKE IT DO WHAT YOU LIKE HERE--->'
Else
SizeArray = Split(FP_FieldVal(fp_rs,"Size"), ";", -1, 0)
response.write "<SELECT NAME=""Size"" SIZE=""1"">" & "<br>"
For Each SizeResult In SizeArray
If SizeResult = SizeArray(0) then
response.write "<OPTION SELECTED VALUE="""& SizeResult & """>" & SizeResult & "</OPTION>"
Else
response.write "<OPTION VALUE="""& SizeResult & """>" & SizeResult & "</OPTION>"
End if
Next
response.write "</SELECT>"
End if
%>
No comments have been posted about Takes data from a field in a database record, for example the field named Size, the data contained . Why not be the first to post a comment about Takes data from a field in a database record, for example the field named Size, the data contained .