Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
30184 Points
4906 Posts
Mar 14, 2011 11:58 AM|LINK
Hi,
This should be working fine. You may be missing something-
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("input[type=button][id*=GetValue").click(function() { alert("Running the last action"); g_ListVal = $("input[type=text][id*=TextBox1]").val(); }); }); </script> </head> <body> <form id="form1" runat="server"> <input type="button" id="GetValue" value="Get Value" /> <input type="text" id="TextBox1" runat="server" /> </form> </body> </html>
asteranup
All-Star
30184 Points
4906 Posts
Re: button onclick
Mar 14, 2011 11:58 AM|LINK
Hi,
This should be working fine. You may be missing something-
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("input[type=button][id*=GetValue").click(function() { alert("Running the last action"); g_ListVal = $("input[type=text][id*=TextBox1]").val(); }); }); </script> </head> <body> <form id="form1" runat="server"> <input type="button" id="GetValue" value="Get Value" /> <input type="text" id="TextBox1" runat="server" /> </form> </body> </html>Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog