javascript error for the textbox

Posted by prince23 on Stack Overflow See other posts from Stack Overflow or by prince23
Published on 2009-10-31T07:41:06Z Indexed on 2010/04/09 12:03 UTC
Read the original article Hit count: 448

Filed under:
|

hi,

<asp:Button ID="Button1" runat="server" Text="Button"  OnClientClick ="toggletr();"  />

<script   type ="text/javascript" >

function toggletr()
{
debugger;
var Inputs =$get("TextBox1");
}
</script>

i trying this i am getting error:

Microsoft JScript runtime error: Object expected

but in textbox it contains value

//var Inputs = document .getElementById ("TextBox1");

if i do like this i am getting the value. can any one tell me how to solve this one in javscript using $get() or JQuery how to assign value

thank you

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript