Results 1 to 4 of 4

Thread: ASP: ITS NAFF Please help (Resolved)

Threaded View

  1. #1

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Unhappy ASP: ITS NAFF Please help (Resolved)

    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

    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>
    this is my first try.

    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.
    Last edited by BodwadUK; Apr 22nd, 2004 at 02:02 AM.
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width