How can i get an array of checkboxes to work
i have a database with client sites. Now these are dynamic and can change meaning i need to create checkboxes at runtime. So far i can find no way of making a working array of checkboxes
this is my first try.Code:<%@ Language=VBScript %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <BODY> <form method = post action = "test1.asp"> <input type = 'checkbox' name= 'Site'> Site 1 <input type = 'checkbox' name = 'Site'> Site 2 <input type = 'submit' name = 'Go' Value = 'Enter'> </form> <% dim Returns dim arrays() dim I Returns = Request.Form ("Site") if Returns <> "" then I = 0 Arrays = split(Returns, ",") upper = ubound(arrays) Do until I = upper Response.write I & ": " & Arrays(I) & "<br>" I = I + 1 loop end if %> </BODY> </HTML>
The problem i have is that if the box isnt checked nothing is returned in the form object. Any that are checked are in no order that can help me establish which boxes they are?
Hope that makes sense. But my head is swimming with the absolute rubbish that is ASP.




Reply With Quote