Added: December/13/2004 at 1:27pm | IP Logged
|
|
|
Hello all, I'm dynamically constructing a <table> from records read from a database table. each record read will occupy one <tr> row with its data.
The last field of the record is populated by a <select> tag's dropdown list. The list is populated with data from a table of one field. This field contains potential 'statuses' of jobs, i.e. 'complete','pending','canceled', etc, etc. Here is the snippit of code below: ------------------------------------------------
If Not RS.EOF then Do While NOT RS.EOF %> <tr align="center" valign="top"> <td><%=RS.Fields.Item("id").Value%>& lt;/td> <td><%=RS.Fields.Item("submit_date").Va lue%></td> <td><%=RS.Fields.Item("proj_req_due_dat e").Value%></td> <td width="55"><input name="proj_title" type="text" value="<%=RS("proj_title")%>" size="55" maxlength="255" readonly> <input name="proj_url" type="text" id="proj_url" value="<%=RS("proj_url")%>" size="55" maxlength="255" readonly style="background-color:#FFFFCC;"></td> <td width="55"><textarea name="proj_det_desc" cols="50" rows="3" readonly="yes"><%=RS("proj_det_desc")%></textare a></td> <td><%=RS.Fields.Item("usr_fname").Valu e%> <%=RS.Fields.Item("usr_lname").Value%> </td> <td bgcolor="#FFEEDD"> <select name="dev_proj_status"> <% ' ///////////// Get the project 'status' data from the tbl_wr_dev_proj_status table /////////// statusSQLstmt = "SELECT status FROM tbl_wr_dev_proj_status ASC" Set statusRS = Conn.Execute(statusSQLstmt) Do While NOT statusRS.EOF %> <option <% if RS("dev_proj_status")=statusRS.fields("status").Value then response.write "selected" end if%>> <%=statusRS.fields("status").Value%></o ption> <% statusRS.movenext loop %> </select> </td></tr> <% RS.MoveNext Loop Else Response.write "<tr valign='middle' height='35'><td align='left' colspan='7'><span class='mediumboldred'>You have no assigned jobs.</span></td></tr>" End If
--------------------------------------------------------
So the only field that can be changed is the last 'status' field previously populated when the record was created. The purpose of this page is to allow the developer to change the status of one or more jobs.
Here's my question: If the developer changes the status of one or more jobs, how do I target those records to be updated? I know I must somehow use the record id but I'm not sure how to go about it.
Thanks for any help, Chris~`^%
__________________ ~`^%
In Vino Veritas
|