943,833 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Marked Solved
  • Views: 1781
  • ColdFusion RSS
Sep 21st, 2009
0

Update several changes in several rows with one button.

Expand Post »
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.
ColdFusion Syntax (Toggle Plain Text)
  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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
cfcoder2 is offline Offline
1 posts
since Nov 2008
Sep 21st, 2009
0

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

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?
Reputation Points: 32
Solved Threads: 44
Posting Whiz
arrgh is offline Offline
349 posts
since Dec 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: Coldfusion Report Problem
Next Thread in ColdFusion Forum Timeline: newbie questions on generating Word document from ColdFusion





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC