title: How to get the gridview textbox control ID in javascript?
body: <p>I have ASP.NET Gridview and Textbox control in it. Now I want to get the Textbox ID in java script.
  I had already referred this question in stack overflow but I couldn't get the exact answer.</p>
  
  <p>My Gridview Template Code is </p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="Amt Recieve Now" ControlStyle-Width="100"&gt;
     &lt;ItemTemplate&gt;
      &lt;asp:TextBox ID="txtAmountReceiveNow" runat="server" CssClass="textboxRight"
          AutoPostBack="true" OnFocus= "GVtxtAmount()"
          OnTextChanged="txtAmountReceiveNow_TextChange" 
                  Text='&lt;%#Eval("AMOUNT_RECEIVE_NOW")%&gt;'&gt;
       &lt;/asp:TextBox&gt;
     &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>and Javascript code is as follows :</p>
  
  <pre><code> function GVtxtAmount() {
      var txtAmountReceive = document.getElementById(
                    '&lt;%= ((GVMaintainReceiptMaster)Container)
                           .FindControl("txtAmountReceiveNow").ClientID %&gt;');
      var selection = txtAmountReceive.value.indexOf(".");
      alert(selection);
   };
  </code></pre>
  
  <p><strong>GVMaintainReceiptMaster</strong> is ID of GridView</p>
  
  <p>Help me to overcome this problem.</p>