I have multiple div and i m showing one div at a time based on selection of link button which is related to perticular div using java script funtion .But problem is when i m clicking button of second div which is generating postback and redirecting to first div.
please give suggestions how can i stop redicting to first div when any postback is occuring
javascript function:-
function funct1(id) {
for (i = 1; i < 11; i++) {
if (i == id) {
document.getElementById("content" + id).style.display = 'block'
}
else {
document.getElementById("content" + i).style.display = 'none'} }}
<table>
<tr>
<td valign="top" style="width:200px">
<asp:Panel ID="Panel1" runat="server" CssClass="leftpanel">
<div id="accordian">
<ul>
<li><asp:LinkButton ID="lbcs" runat="server" OnClientClick="funct1('1');return false" ><h3>Approval Status</h3></asp:LinkButton></li>
<li><asp:LinkButton ID="lbkcs" runat="server" OnClientClick="funct1('2');return false"><h3>Consumer Selection</h3></asp:LinkButton></li>
</ul></div></asp:Panel>
</td>
<td>
<div id="content1">
<asp:Button ID="lnk1" runat="server" Text="Add 1" ></asp:Button>
</div>
<div id="content2">
<asp:Button ID="lnk2" runat="server" Text="Add 2" ></asp:Button>
</div>
</td></tr></table>