title: Dynamically created textbox in ajax returns null
body: <p>Following is the code in which textbox is created</p>
  
  <pre><code>&lt;input type="text" class="enter_comment"  value='comments' id='comm&lt;?php echo $row['p_id'];?&gt;'/&gt;
  &lt;input type='button' value='enter' class='cbtn' id='&lt;?php echo $row['p_id'];?&gt;'&gt;
  </code></pre>
  
  <p>And here is the button click code in <code>ajax</code>.</p>
  
  <pre><code>$(".cbtn").click(
      function(e){
          alert("here");
          var id=$(this).attr('id');
          var c="#comm"+id;   
  
          var comment = $(c).attr("value");
          event.stopImmediatePropagation();
  
          $.post("comments.php",{id:id, comment:comment},function(e){         
              $('.comment').append(e);
          }       
      );      
  });
  </code></pre>
  
  <p>The problem is that when I try to get value of text box , it returns null. Even when I tried to set value through innerHTML, it said : "Cannot set property of null".</p>
  
  <p>Above mentioned code is in AJAX in the same file. And ids of text boxes are set by value in database</p>