alchung4
03-21-2007, 02:12 PM
1) Script Title: Tab Content Script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tabcontent.htm
3) Describe problem:
I have implemented the TabContent script in my aspx pages and it works fine unless the tab items are generated by asp repeater in the following way. When I click on a tab, it causes the page to be refreshed and this tab will not appear to be 'selected'. Does anyone know how to solve this? Thank you in advance.
<ul id="maintab" class="shadetabs">
<asp:repeater ID="rptFolio" runat="server">
<ItemTemplate>
<li>
<asp:linkbutton ID="lnkFolio" runat="server" Oncommand="lnkFolio_OnCommand" />
</li>
</ItemTemplate>
</asp:repeater></ul>
The code generated is the following:
<ul id="maintab" class="shadetabs">
<li>
<a id="rptFolio_ctl00_lnkFolio" href="javascript:__doPostBack('rptFolio$ctl00$lnkFolio','')">STRATEGIQUE</a>
</li>
<li>
<a id="rptFolio_ctl01_lnkFolio" href="javascript:__doPostBack('rptFolio$ctl01$lnkFolio','')">McConnell</a>
</li>
</ul>
Here is a screenshot of the tab misbehaving. As I click on it, it loads the right content, but the actual tab is not highlighted.
http://img340.imageshack.us/my.php?image=tabproblemvs3.png
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tabcontent.htm
3) Describe problem:
I have implemented the TabContent script in my aspx pages and it works fine unless the tab items are generated by asp repeater in the following way. When I click on a tab, it causes the page to be refreshed and this tab will not appear to be 'selected'. Does anyone know how to solve this? Thank you in advance.
<ul id="maintab" class="shadetabs">
<asp:repeater ID="rptFolio" runat="server">
<ItemTemplate>
<li>
<asp:linkbutton ID="lnkFolio" runat="server" Oncommand="lnkFolio_OnCommand" />
</li>
</ItemTemplate>
</asp:repeater></ul>
The code generated is the following:
<ul id="maintab" class="shadetabs">
<li>
<a id="rptFolio_ctl00_lnkFolio" href="javascript:__doPostBack('rptFolio$ctl00$lnkFolio','')">STRATEGIQUE</a>
</li>
<li>
<a id="rptFolio_ctl01_lnkFolio" href="javascript:__doPostBack('rptFolio$ctl01$lnkFolio','')">McConnell</a>
</li>
</ul>
Here is a screenshot of the tab misbehaving. As I click on it, it loads the right content, but the actual tab is not highlighted.
http://img340.imageshack.us/my.php?image=tabproblemvs3.png