problem in passing Id from asp.net to Javascript
<p>I need to call a functoin on button click and pass the value of id into that function...here is what I m doing ...but I bet i m doing sth wrong bcoz its not working</p>

<pre><code>function Datarate(frm) {

    var ar = document.getElementById('&lt;%= submit.ClientID%&gt;');
    alert(ar);
}

&lt;asp:Button runat="server" ID="submit" Text="Submit" OnClientClick="return Datarate(this.form);" PostBackUrl="www.google.com" /&gt; 
</code></pre>

<p>but i m getting alert as null...</p>

<p>any idea where I m getting wrong...
Thanks,</p>
