View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
I don't see any place in your code where you are setting the value of variable sclientid.  Most probably the Request.Form method is complaining because sclientid is not a character string.

FoxWeb Support Team
support@foxweb.com email

Sent by Joe Goldsmith on 10/11/2003 08:28:58 PM:
I have a table with a list of buyers and I want to send a listing to chosen buyers. To do this I want to use a checkbox then run through the buyers list and check for a checked checkbox. The code snippit is:

<%
IF Request.FormCount("btnchoice") > 0
    FOR I = 1 TO m.lnbuyrecs
    GO I 
    IF Request.Form(sclientid) = "1"
       RESPONSE.WRITE("Got IT")
    ENDIF
    ENDFOR
ENDIF
%>
 
<FORM NAME=addproperty METHOD=post ACTION="abuyertomany.fwx">
    <TABLE CELLSPACING=1 width=100%>
    <%SELECT buyers%>
    <%FOR I = 1 TO m.lnbuyrecs
    GO I%>
     <TR>
         <TD>
             <INPUT TYPE="checkbox" NAME=<%=(sclientid)%> VALUE="1" <%=IIF(Request.Form("TEST") = "1", "checked", "")%>>
         </TD>
     </TR>
 <%ENDFOR%>
     <TR>
         <TD>
             <INPUT TYPE="Submit" NAME=btnchoice VALUE="Send">
         </TD>
    </TR>                
</TABLE>
</FORM>
 
The error message is:
Message:  Invalid FieldName parameter
Program:  c:\inetpub\wwwroot\admin\abuyertomany.fxp
Line #:  109
Line:  IF Request.Form(sclientid) = "1"
 
I know that the checkbox syntax is wrong but I cannot figure out the right syntax for the Request.Form. Can someone help please?