This is a migrated thread and some comments may be shown as answers.

Javascript error on clicking a link in a datalist

1 Answer 52 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Drew Mace
Top achievements
Rank 1
Drew Mace asked on 02 Feb 2009, 07:50 PM
We are getting this error when someone clicks on the asp:hyperlink in the datalist below:

this.get_linkElement() is null

<telerik:RadPanelBar ID="pbarUsersGroups" runat="server" Skin="WebBlue" AllowCollapseAllItems="True" CausesValidation="False"
           PersistStateInCookie="True"  >
                <collapseanimation duration="100" type="Linear" />
                    <telerik:RadPanelItem runat="server" Text="Online Users" PostBack="False">
                        <Items>
                            <telerik:RadPanelItem>
                                <ItemTemplate>
                                    <asp:DataList ID="dlOnlineUsers" runat="server" Width="100%" CellPadding="0" CellSpacing="0">
                                        <ItemTemplate>
                                            <asp:HyperLink ID="lnkOpenChatWindow" NavigateUrl='<%# "javascript:openChatWindow(false, \"" + Eval("Bare") + "\");" %>' runat="server" CssClass="rpLink">
                                                <span class="onlineUser"><%# Eval("User") %></span>
                                            </asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:DataList>
                                </ItemTemplate>
                            </telerik:RadPanelItem>
                        </Items>
                 </telerik:RadPanelItem>
                <expandanimation duration="100" type="Linear" />
            </telerik:RadPanelBar>


Can anyone shed some light on why our users would be consistently getting this error when they click on the link?

Thanks

Drew

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 03 Feb 2009, 01:23 PM
Hi Drew,

This error occurs because of the "rpLink" cssClass which is set to the asp:HyperLink, it's confused with the item's anchor tag.

Best regards,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
PanelBar
Asked by
Drew Mace
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or