dimanche 28 janvier 2018

pre populate checkbox in a loop VBscript

I am trying to pre populate the check boxes in a DO loop. The values from the querystring are matched with the value from database. But in this case, all checkboxes are checked irrespective of any querystring value. The VBscript code is given below:

<%
Do While NOT RS.EOF

Designchk=Request.QueryString("Designer")
Designchk2=RS("Brand")

if instr(Designchk,DesignchkP2) then
chkd="checked" 
end if

ListL= ListL & vbCrLf & "<li><label class='contR'>" & Designchk2 & "<input type='checkbox' " &  chkd & " name='Designer' value=" & Designchk2 & "></label></li>"
RS.MoveNext
Loop
%>




Aucun commentaire:

Enregistrer un commentaire