Date:  03/26/2011 10:38:31 PM Msg ID:  004261
From:  FoxWeb Support Thread:  004258
Subject:  Re: Selecting several records in a grid
There are several ways to tackle this problem, including he use of a client-side grid component in conjunction with Ajax. However if you are not comfortable with JavaScript and ajax, then you should probably keep it simple and use a regular HTML table and form submissions.
If you expect users to be entering information for multiple records in a single page, you will need to set the name of these fields, so that they identify the record. In the example below, I'm assuming that Parte_num is your table key.
 
Disclaimer: This is not pretty nor complete code and has not been tested.
 
select * from Partes where ... into cursor results
if _tally > 0
    %>
    <form action="..." method="post">
    <table>
    <%
    scan
        %>
        <tr>
            <td><%=results.Parte_num%></td>
            <td><%=results.Averia%></td>
            <td><%=results.Trabajo%></td>
            <td><input type="text" name="<%=results.Parte_num%>_Firmado" /></td>
            <td><input type="text" name="<%=results.Parte_num%>_Conform" /></td>
        </tr>
        <%
    endscan
    %>
    </table>
    </form>
    <%
endif

The output from the above could look like this:

<form action="..." method="post">
<table>
    <tr>
        <td>1234</td>
        <td>Some Data</td>
        <td>Some Other Data</td>
        <td><input type="text" name="1234_Firmado" /></td>
        <td><input type="text" name="1234_Conform" /></td>
    </tr>
    <tr>
        <td>5678</td>
        <td>Some Data</td>
        <td>Some Other Data</td>
        <td><input type="text" name="5678_Firmado" /></td>
        <td><input type="text" name="5678_Conform" /></td>
    </tr>
</table>
</form>

The code that receives the form submission would have to identify records by splitting the Firmado and Conform field names on the underscore character and use the prefix as the part number.
FoxWeb Support Team
support@foxweb.com email
Sent by Carlos Fuertes on 03/26/2011 08:46:06 AM:
 I need to select different records in a cursor using a check box (like you do in fwadmin.fwx). For example, I have a cursor with the following fields:
Parte_num n(10,0)
Averia c(100)
Trabajo c(100) 
Firmado l
Conform c(50)
The 3 firts fields have information and the two last fields need to be filled. 
What I want is to show in the browser a grid showing data in the 3 first fields (Parte_num,Averia,Trabajo), and a check box and a text box ready to get information for the other two (Firmado and Conform).
Could you, please, send me a piece of code showing how to do this?
Thankyou very much in advance
Carlos