title: input type="image" vs type="submit"
body: <p>I programmed for a long time checking for StructKeyExists(form,"Update") until I change my input from type="submit" to type="image".  IE doesn't send the name of the control back when type="image", but instead sends Update.X and Update.Y.</p>
  
  <pre><code>&lt;form method="post"&gt;
  Old Way:&lt;br /&gt;
  &lt;input type="submit" value="3" name="Update" /&gt;&lt;br /&gt;
  &lt;input type="submit" value="4" name="Delete" /&gt;
  &lt;p&gt;New Way:&lt;/p&gt;
  &lt;input type="image" value="1" name="Update" src="http://www.google.com/intl/en_ALL/images/logo.gif" /&gt;&lt;br /&gt;
  &lt;input type="image" value="2" name="Delete" src="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My first thought was that I should just add two characters to my logic </p>
  
  <pre><code>from: &lt;cfif StructKeyExists(form,"Update")
  to:   &lt;cfif StructKeyExists(form,"Update.X")
  </code></pre>
  
  <p>But I would like a solution that handles both type="submit" and type="image".  Right now my logic is:</p>
  
  <pre><code>&lt;cfif StructKeyExists(form,"Update") OR StructKeyExists(form,"Update.X")&gt;
     &lt;!--- UPDATE table ---&gt;
  &lt;cfelseif StructKeyExists(form,"Delete") OR StructKeyExists(form,"Delete.Y")&gt;
     &lt;!--- DELETE FROM Table ---&gt;
  &lt;/cfif&gt;
  </code></pre>
  
  <p>Q: Is there a more elegant way to check for which button has been pressed?
  Assuming there is more than one button on the form of course, because if I only had to check to see if the form was submitted, I would check to see if form.fieldnames existed.</p>