Is it an aspx page or html page, if it is an aspx page then we can't have more than one 'form' tags.
On Sat, Jul 4, 2009 at 11:15 PM, pradeepsixer <[email protected]>wrote: > > Hey guys I just want to click a button having the attribute > runat="server" automatically.Pls help me. Here's my code > > > > <script runat="server"> > Sub submit(ByVal sender As Object, ByVal e As EventArgs) > MsgBox("Success") > End Sub > </script> > <html> > <head> > <title>Test Page</title> > <script type="text/javascript" language="javascript"> > function cpy() > { > var x = document.getElementById("t1").value; > document.getElementById("x1").value = x; > } > function aclick() > { > document.getElementById("login").click(); > } > </script> > </head> > <body> > <form method="post" name="form1" target="_blank" onsubmit="cpy(); > aclick()"> > <input type="text" id="t1" /> > <input type="submit" value="OK" /> > </form> > <form name="form2" runat="server" id="fm2"> > <input type="text" id="x1" runat="server"/> > <input type="submit" value="OK" id="login" onclick="submit" > runat="server"/> > </form> > </body> > </html> > > In this I want to autoclick the Submit button in 'form2' when I click > the Submit button in 'form1' >
