I'm trying to call a javascript function that will display a subcategory when the user clicks on a main category. MY JS works fine outside of this project...The second datalist had an ID of "A", so that when I click on an item in the first datalist I'd like to display the data from the second.
Here is my code:
---------------------> The JS Call:
--------------------------> The data to display
Does my question make sense?
Here is my code:
---------------------> The JS Call:
Code:
<asp:datalist id="dlCategories" Runat="server">
<ItemTemplate>
<p class="wht_14" style="margin:8px 14px 8px 0px"><b>
<asp:LinkButton ID="lnkButton" [b]OnClick="javascript:show('A')"[/b] Runat="server" CommandArgument='<%# Container.DataItem("categoryID") %>'>
<%#Databinder.Eval(Container.Dataitem, "CategoryName")%>
</asp:LinkButton>
</b>
</p>
</ItemTemplate>
</asp:datalist>
--------------------------> The data to display
Code:
<tr>
<td [b] id="A" [/b] style="DISPLAY: none">
<asp:datalist id="dlProducts" runat="server">
<ItemTemplate>
<P class="wht_11" style="MARGIN: 0px 18px 8px 0px">
<asp:LinkButton [b] id="A" [/b] Runat="server" CommandArgument='<%# Container.DataItem("productsID") %>'>
<%#Container.DataItem("ProductName")%>
</asp:LinkButton></P>
</ItemTemplate>
</asp:datalist>
</td>
</tr>
Does my question make sense?