Update several changes in several rows with one button.

Thread Solved

Join Date: Nov 2008
Posts: 1
Reputation: cfcoder2 is an unknown quantity at this point 
Solved Threads: 0
cfcoder2 cfcoder2 is offline Offline
Newbie Poster

Update several changes in several rows with one button.

 
0
  #1
Sep 21st, 2009
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.
  1. (onChange="document.getElementById('Saved_RowID').value ='#MO_CD#';)
  2. <form name="update" action="main.cfm" method="post">
  3. <table class="projectodowoborder" >
  4. <thead>
  5. <tr>
  6. <th colspan="7" align="center" id="locked">
  7. <input type="submit" border="0" align="middle" value=" Save " class="def" onclick="document.update.RowID.value='#getRevenue.currentrow#';document.updateRev.action.value = 'Save'</th>
  8. <th colspan="7" align="center" id="locked">
  9. <input type="Reset" border="0" align="middle" value=" Cancel "class="def">
  10. </th>
  11. </tr>
  12.  
  13. <tr>
  14. <th class="projcapheaderborder" id="locked"> Month</td>
  15. <th class="projcapheaderborder" id="locked"> Public Ag</td>
  16. </tr>
  17. <cfoutput query='MyQ">
  18. <tr>
  19. <td>
  20.  
  21. <input name="collections_#MO_CD#" onChange="document.getElementById('Saved_RowID').value ='#MO_CD#';_CF_checkinteger();">
  22. </td>
  23. <td >
  24. <input name="REFUNDED_#MO_CD#" type="text" onChange="document.getElementById('Saved_RowID').value ='#MO_CD#'>
  25. </td>
  26. </tr>
  27. </cfoutput>
  28. </table>
  29. <input type="hidden" name="Saved_RowID" value="">
  30. </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.
Last edited by peter_budo; Sep 22nd, 2009 at 9:17 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 45
Reputation: arrgh is an unknown quantity at this point 
Solved Threads: 6
arrgh arrgh is offline Offline
Light Poster

Re: Update several changes in several rows with one button.

 
0
  #2
Sep 21st, 2009
I am not sure what you're asking here. Are you asking how to perform some validation on the client side (javascript), how to save the information to a database, or something else?
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC