How to get TextBox ClientID in a javascript function using ListView and InsertTamplate or EditTemplate
<p>I have a ListView with ItemTemplate, EditTemplate and InsertTemplate.
There are several TextBoxes in Edit and InsertTemplate. I need to calculate some of the values in Javascript, but I don't know, how to get a ClientID in my JS function or pass it as a parameter.</p>

<p>Javascript function:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function calculate() {
        var length = document.getElementById('???').value;
        var quantity = document.getElementById('???').value;
        var fullLength = document.getElementById('???');
        fullLength.value = length*quantity;
    }
&lt;/script&gt;
</code></pre>

<p>ASP.NET piece of my ListView:</p>

<pre><code>&lt;InsertItemTemplate&gt;
    &lt;asp:TextBox ID="Weight" runat="server" Text='&lt;%#Bind("Weight") %&gt;' /&gt;
    &lt;asp:TextBox ID="Quantity" runat="server" Text='&lt;%#Bind("Quantity") %&gt;' /&gt;
    &lt;asp:TextBox ID="FullLength" runat="server" Text='&lt;%#Bind("FullLength") %&gt;' /&gt;
    &lt;asp:Button runat="server" ID="Insert" Text="AddNewEntry" CommandName="Insert" OnClientClick="calculate()" /&gt;
&lt;/InsertItemTemplate&gt;
</code></pre>

<p>What sould be instead of '???'?
Or, can I pass it somehow in the parameters in the OnClientClick="calculate(???,???,???)"?</p>

<p>Thanks in advance, JiKra</p>
