Hi Guys, I’m panicking for this issue. Please help.
I have a form that all the rows of the table are dynamic and there are text areas in each row that the value could change.
The only thing that makes each row unique is the Month row belongs to Month 1 , month 2 adn...). Therefore I created a hidden field in the form that its value will change to the Month belongs to that row.
(onChange="document.getElementById('Saved_RowID').value ='#MO_CD#';)
<form name="update" action="main.cfm" method="post">
<table class="projectodowoborder" >
<thead>
<tr>
<th colspan="7" align="center" id="locked">
<input type="submit" border="0" align="middle" value=" Save " class="def" onclick="document.update.RowID.value='#getRevenue.currentrow#';document.updateRev.action.value = 'Save'</th>
<th colspan="7" align="center" id="locked">
<input type="Reset" border="0" align="middle" value=" Cancel "class="def">
</th>
</tr>
<tr>
<th class="projcapheaderborder" id="locked">Month</td>
<th class="projcapheaderborder" id="locked">Public Ag</td>
</tr>
<cfoutput query='MyQ">
<tr>
<td>
<input name="collections_#MO_CD#" onChange="document.getElementById('Saved_RowID').value ='#MO_CD#';_CF_checkinteger();">
</td>
<td >
<input name="REFUNDED_#MO_CD#" type="text" onChange="document.getElementById('Saved_RowID').value ='#MO_CD#'>
</td>
</tr>
</cfoutput>
</table>
<input type="hidden" name="Saved_RowID" value="">
</form>
What should I do if they change several rows at the same time which is the case. I have a procedure that receives the string of the data that has been changed for each row.
the value of form.Saved_RowID on the action page is the the Month for example if the value of the 1st row which belongs to Month 12 is changed then the form.Saved_RowID is 12.
I don't know how to get the values fo the changed fields if several rows changed. I really appreciate your help.
Thank you so much.