title: find input field where type=text in the table row
body: <p>I have a delete image that that is triggered by a 'click' handler.  I'm passing the element parameter into the function that triggered the event, which is the delete image.  </p>
  
  <p>Is there a way I can find the input where <code>type="text"</code> for the table row that of the delete image that was clicked?</p>
  
  <p>Here is the code I'm working with:</p>
  
  <pre><code>        A4J.AJAX.AddListener({
              onafterajax: function(req,evt,data) {  
  
                  j$('[id$=deleteImage]').on('click', function(elem) {
                      console.log('the delete button was clicked');
                      console.log('************** before ' + localStorage.activeButtons);
                      var activeArray  = localStorage.activeButtons.split(',');
                      var idx = activeArray.indexOf('account');
                      if (idx &gt; -1) activeArray.splice(idx, 1);
                      localStorage.activeButtons = activeArray.join(',');
                      console.log('************** after ' + localStorage.activeButtons);
                  });
  
                  var lastRow = j$('table[id$=participantTable] tbody tr:last');                 
                  var active = localStorage.activeButtons.split(',');
  
                  var dataRows = j$('tr.dataRow');
                  dataRows.each(function(index, elem) {
                      updateImages(elem, active[index]);
                  });
              }
          });
  </code></pre>
  
  <p>I need to find the <code>input[type="text"]</code> in the table row that the delete image was clicked and get the id of that input field and check if the id contains one of the following values: <code>contact, user or account</code>.  I need to pass the value contained in the input id into the indexOf() method.</p>
  
  <p>Thanks for any help.</p>