davearia Posted October 15, 2006 Posted October 15, 2006 Hi All, What I am trying to do is probably ridiculously easy but I need your help. For example I am trying to call the click event of button called Button1. Here is my attempt (line 6 being the line of importance): 1 <html xmlns="http://www.w3.org/1999/xhtml" > 2 <head runat="server"> 3 <title>Ajax</title> 4 </head> 5 <body> 6 <script type="text/javascript">Button1.click();</script> 7 <noscript>alert("Disabled");</noscript> 8 <form id="form1" runat="server"> 9 <div> 10 <asp:Button ID="Button1" runat="server" Text="Button"/></div> 11 </form> 12 </body> 13 </html> 14 This doesn't seem to work, can you help. Cheers, Dave. Quote
eramgarden Posted October 16, 2006 Posted October 16, 2006 that doesnt look correct. You need the onClick event of the Button, name it for example, myButtonOnClick. Then have a function called myButtonOnClick and do whatever you need to do there. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.