Quote:
Originally Posted by Gjslick
form for each row
|
yes i am using html table so thats not going to work for me.
all this code is scanned, hope is not difficult to read..
update.cfm
Code:
<!--- update.cfm --->
<form name="formtab1e" action="update_dir.cfm" method="post">
<table width="1000" a1ign="center" bgco1or="#FFFFCC" frame="box">
<thead bgco1or="#66FFCC">
<tr>
<td width="50" align="center">Edit</td>
<td width="50" align="center">Request</td>
<td width="125" align="center">Project Name</td>
<td width="110">Number of Drawing</td>
<td width="150" align="center">Date requested</td>
<td width="150" align="center">Time requested</td>
<td width="130" align="center">Done By</td>
<td width="130" align="center">Status</td>
<td width="130" align="center">Comment</td>
<td width="130" align="center">Update</td>
</tr>
</thead>
<cfoutput query="DIRdata">
<tr>
<td a1ign="center"><input name="roption" type="radio" onClick="enab1etxt(this);"></td>
<td align="center">#DIRdata.currentrow#</td>
<td align="center">#ProjectName#</td>
<td><input name="numdraw" type="text" disabled va1ue="#NumOfDrawing#" size="8"></td>
<td a1ign="center"><input type="hidden" name="daterequested" va1ue="#DateformatIDateRequested,
"m/d/yyyy")#">#DateformatIDateRequested,"dd/mmm/yyyy")#</td>
<td a1ign="center">#TimeformatITimeRequested,"h:mm tt")#</td>
<td a1ign="center">#DoneBy#</td>
<td a1ign="center">
<select name="status" disabled>
<cfif #ProjectStatus# eq "Pending">
<option>Pending</option>
<option>Comp1eted</option>
<cfe1seif #projectStatus# eq "Completed">
<option>Completed</option>
<option>Pending</option>
</cfif>
</select>
</td>
<td align="center">
<input type="hidden" name="ProjectName" va1ue="#ProjectName#">
<input type="hidden" name="comment" value="#ProjectComment#">
<a href="viewcomment.cfm?ProjectName=#ProjectName#&comment=#ProjectComment#" target="_blank">View</a>
</td>
<td align="center"><input type="submit" name="update" disabled value="Update"></td>
</tr>
</cfoutput>
</table>
<table width="1000" align="center">
<tr>
<td width="832"><font color="#CCOOOO">Click on edit then change the details. </font></td>
<td width="103" align="right"></td>
<td width="49" align="right">
<input type="button" name="print" value="Print" onClick="goto()">
</td>
</tr>
</table>
</form>
updateAction.cfm
Code:
<!--- updateAction.cfm --->
<cfquery name="DIRdata" datasource="DBcadcam">
UPDATE DIR
SET NumOfDrawing = '#Form.numdraw#',
ProjectStatus = #Form.status#
WHERE DateRequested='#form.daterequested#'
</cfquery>
<cflocation url="update.cfm">