title: Checking for TextField changes once a form was submitted in Coldfusion
body: <p>I have code that displays database entries, and allows for editing/deletion.</p>
  
  <p>I am trying to find some way on submission to see if a particular field has been changed, so if the old data of the field is not referenced by any database entries, I can delete it. Any ideas on how to do this?</p>
  
  <p>To respond to the first comment / Edit: It is somewhat hard to put code of this problem up here, but I will try to grab some snippets that help. </p>
  
  <pre><code>&lt;td&gt;Upload File:&lt;/td&gt;
  &lt;td&gt;
      &lt;input type="file" name="txtName" size="50" /&gt;
  &lt;/td&gt;
  &lt;cfif url.filesid neq "0"&gt;
  &lt;td&gt;Or Use Server File:&lt;/td&gt;
      &lt;td&gt;
      &lt;select name="ddlFilesNames"&gt;
          &lt;option value="" selected&gt;&lt;/option&gt; 
              &lt;cfoutput query="qfiles"&gt;
                  &lt;option 
                    value="#qfiles.name#" 
                    #iif(qfiles.name eq recEditFiles.fileName,DE("selected"),DE(""))#
                  &gt;#qfiles.name#&lt;/option&gt;
              &lt;/cfoutput&gt;                         
      &lt;/select&gt;
      &lt;/td&gt;
  &lt;/cfif&gt;
  </code></pre>
  
  <p>These are the two fields I need to check if they changed, when the edit button is hit the select drop down list has the current server file displayed, but during editing they can either add a file to the textfield (through a browse option to upload a new file) or they can select another file from the dropdown list, and then hit an update button that submits the changes.</p>
  
  <p>When the update button is hit I need to somehow check to see if the fields were changed at all.</p>
  
  <p>I feel that one of the main problems is that once the button is hit, a javascript method is called, and so far I have been unsuccessful is lacing coldfusion within javascript methods, everytime I try to do this or visa-versa it breaks the program.</p>