Adam - 

I am not exactly sure how this is working from looking at the code - but
would offer the following:

What I have done in this instance - is when outputting the table - I would
use form fields in the table cells to display your "editable data". Then you
are just submitting a form...

Probably not as "sexy" as an auto update jquery table - - but it works.
Example Code as follows: 

<cfif IsDefined("FORM. itemcount ")>
<cfloop index="count" from="1" to="#form.itemcount#" >
          <!--- Set Dynamic parameters for activating pages --->
      <cfset variables.MyID = Evaluate("form.MyID_#count#")>
      <cfset variables.FiledNameOne = Evaluate("form.FiledNameOne_#count#")>
      <cfset variables.FiledNameTwo = Evaluate("form.FiledNameTwo_#count#")>

      <!--- Make the changes from the form --->
      <cftransaction>
      <cfquery datasource="#Application.DSN#"
username="#Application.username#" password="#Application.password#">
          UPDATE MyAwesomeData
              SET 
                  ,FiledNameOne         = <cfif variables.DVID  NEQ
""><cfqueryparam value="#variables.DVID#"><cfelse>NULL</cfif>
                  ,FiledNameTwo         = <cfif variables.ConfID  NEQ
""><cfqueryparam value="#variables.ConfID#"><cfelse>NULL</cfif>
          WHERE MyID = #variables.MyID#
      </cfquery>
      </cftransaction>
  </cfloop>
</cfif>


<cfform method="post" name="mycfform">
<cfset count = 1>
<table>
<cfloop query="MyQuery">
        <tr>
        <td><input type="checkbox" name="Delete_#count#" value="1" /></td>
        <td>
        <input type="hidden" name="MyID_#count#" value="#MyQuery.MyID#">

        </td>
        <td><input type="text" name="FiledNameOne_#count#"
value="#MyQuery.FiledNameOne#"  /></td>
        <td><input type="text" name="FiledNameTwo_#count#"
value="#MyQuery.FiledNameTwo#"  /></td>
    </tr>
    <cfset count = count + 1>
</cfloop>
</table>
<cfset count = count - 1>
        <input type="hidden" name="itemcount"
value="<cfoutput>#count#</cfoutput>">
<input type="submit" value="update data" name="submit">
</cfform>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5903
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to