Creating Dynamic ID and checking ID in jquery and php
<pre><code>$('#commentAlink').click(function()
     {   $('div').click(function()
         {   var ID=this.id;
             if(ID).click(function(){     $('#divcommenttextbox').show(); });                });   });
&lt;?php   while($rows=mysql_fetch_array($result))
    { $topicid=$rows['TopicID'];
       echo $rows['Title_of_Topic'];
?&gt;
&lt;div class="commentlink" id="&lt;?php echo $topicid; ?&gt;"&gt;&lt;a href="#" id="commentAlink"&gt;Comment&lt;/a&gt;&lt;/div&gt;
&lt;div id="divcommenttextbox"&gt;&lt;textarea name="topiccomment" cols="50" rows="5"&gt;&lt;/textarea&gt;&lt;br /&gt;
    &lt;a href="#" class="commentlink" id="cancellink"&gt;Cancel&lt;/a&gt; &lt;input type="button" value="Comment" /&gt;
&lt;/div&gt; &lt;?php } ?&gt;
</code></pre>

<p>here is my problem i got all the Id' from my database and show record
I like to show comment link and if comment click, I need to show div tag.
I can do only for first record. please tell me what wrong am i doing
hope u understand my problem. waiting for the reply</p>
