[thelist] ASP Brain Teaser
Brian Delaney
brian.delaney at mccmh.net
Mon Jul 10 11:24:27 CDT 2006
This code always prints the first html line twice and the others only
once. The first line is correct - checked and the repeat of it is show
not checked. The second repeat needs to be removed. If someone one can
tell me what to do to catch that I would appreciate it, thanks.
Call OpenResourceCatalogDBConn()
Set rsCatagoryList = Server.CreateObject("ADODB.Recordset")
strSQL = "Select name,id from categories order by name "
rsCatagoryList.Open strSQL, ResourceCatalogDBConn
Dim ServicesArray,vtrue
ServicesArray = split(serviceidlist, " ")
rsCatagoryList.MoveFirst
'vtrue = "0"
'1st service
Set rsServiceList = Server.CreateObject("ADODB.Recordset")
strSQL1 = "Select * from Services where catagoryid = " & "'" &
mid(rsCatagoryList("ID"),2,36) & "'" & " order by name "
rsServiceList.Open strSQL1, ResourceCatalogDBConn
Do While Not rsServiceList.EOF
For Icounter = 0 to Ubound(ServicesArray)
If mid(rsServiceList("ID"),2,36) =
ServicesArray(Icounter) Then
servicelistHTML = servicelistHTML & "<input
id=checkboxs type=checkbox value= " & mid(rsServiceList("ID"),2,36) & "
name=checkboxs
checked> "
servicelistHTML = servicelistHTML &
rsServiceList("Name") & "<br>"
vtrue = true
else
vtrue = false
end if
Next
if vtrue <> true then
servicelistHTML = servicelistHTML & "<input
id=checkboxs type=checkbox value= " & mid(rsServiceList("ID"),2,36) & "
name=checkboxs> "
servicelistHTML = servicelistHTML &
rsServiceList("Name") & "<br>"
end if
rsServiceList.MoveNext
Loop
'2nd service
rsCatagoryList.MoveNext
'vtrue = "0"
everything repeats for this and the other services..
....................
Thanks,
Brian
*
*
*
This message, including any attachments, is intended solely for the use of the named recipient(s) and may contain confidential and/or privileged information. Any unauthorized review, use, disclosure or distribution of this communication(s) is expressly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy any and all copies of the original message.
More information about the thelist
mailing list