multiple buttons
Hi, I am not sure if this is the right forum but i will try asking anyway. I have an aspx page with multiple buttons. I want to avoid postback so i want to use js. When i click on the buttons each takes me to the same page just with a different aprst: practice.aspx?aprst= I tried the following but nothing happens when i click the buttons: aspx: <script language="javascript"> function SbtForm (aspr) { if (aspr == "ads") { document.Form1.submit ="practice.aspx?aprst=1"; } if (aspr=="new") { document.Form1.submit ="practice.aspx?aprst=0"; } } </script> </HEAD> <body> <form id="Form1" method="post" runat="server"> <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="1" align="center"> <TR> <TD> <asp:Button id="btnAllAds" runat="server" Text="מודעות " Width="92px"></asp:Button></TD> <TD> <asp:Button id="btnNewAds" runat="server" Text="מודעות חדשות" Width="121px"></asp:Button></TD> </TR> vb.aspx: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here btnAllAds.Attributes.Add("onClick", "SbtForm ('ads');") btnNewAds.Attributes.Add("OnClick", "SbtForm ('new');") End Sub