Get auto incremented div id so that it can be used with ajax to return a value back to php
<p>Using mysql_query results to create an html form like below with auto incremented prefixed value for div ids: </p>

<pre><code>&lt;div id="favorite'.$count.'"&gt;
  &lt;form action="javascript:void(0);" method="post"&gt;
    &lt;input type="hidden" name="sec" value="'.$ident_inpt.'"/&gt;
    &lt;input type="hidden" name="t" id="t'.$count.'" value="mo-'.$usr.'-'.$rmid.'-'.$_SESSION['STORE'].'"/&gt;
    &lt;input type="submit" value="'.$lang['590'].'" class="favorites" onclick="upd_favorite();"/&gt;
  &lt;/form&gt;
&lt;/div&gt;
</code></pre>

<p>How can I get the ids of favorite### and t###  so that I can get the loop going?</p>

<p>I use this but only works with static ids:</p>

<p><code>$('#favorite').html(ajaxRequest.responseText);</code></p>

<p>and:   <code>var addit = document.getElementById("t").value;</code></p>

<p>Thanks in advance for any suggestion.</p>
