Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5995399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:57:15+00:00 2026-05-22T23:57:15+00:00

Quickly getting into the code, below is asp.net markup for the accordian which hosts

  • 0

Quickly getting into the code, below is asp.net markup for the accordian which hosts the topic headline as header for each pane and contents of which are comments to be moderated.

 <ajaxToolkit:Accordion runat="server" id="accCommentTrash" fadetransitions="true"
                                    selectedindex="-1" requireopenedpane="false" autosize="None" headercssclass="accTitle"
                                    headerselectedcssclass="accSelectedTitle">
                                    <HeaderTemplate>
                                        <h4>
                                            Title:(<%# ((System.Data.DataRowView)Container.DataItem)["Title"]%>)</h4>
                                    </HeaderTemplate>
                                    <ContentTemplate>
                                        <asp:Repeater runat="server" id="rptrComments" datasource='<%# ((System.Data.DataRowView)Container.DataItem).CreateChildView("CommentRelation") %>'>
                                            <HeaderTemplate>
                                                <ul class="comment_trash">
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <li id='<%#  new Utilities().encrypt(((System.Data.DataRowView)Container.DataItem)["CommentId"].ToString()) %>'
                                                    name='<%# new Utilities().encrypt(((System.Data.DataRowView)Container.DataItem)["CommentId"].ToString()) %>'>
                                                    <asp:Label id="lblCommentor" runat="server" text='<%# ((System.Data.DataRowView)Container.DataItem)["AuthorName"] %>'
                                                        cssclass=""></asp:Label>
                                                    <span>Commented on </span><a href='?id=<%# new Utilities().encrypt(((System.Data.DataRowView)Container.DataItem)["BoardId"].ToString())%>'
                                                        title="Click to view board" class="">
                                                        <%# ((System.Data.DataRowView)Container.DataItem)["Title"] %>
                                                    </a>
                                                    <p>
                                                        <asp:Label runat="server" id="lblComment" text='<%# ((System.Data.DataRowView)Container.DataItem)["Comment"] %>'
                                                            cssclass=""></asp:Label>
                                                    </p>
                                                    <p>
                                                        Trashed about
                                                        <%# GetTimeSpan(DateTime.Now,((System.Data.DataRowView)Container.DataItem)["ModifiedOn"].ToString()) %>
                                                        hours ago, Commented on
                                                        <%# DateTime.Parse(((System.Data.DataRowView)Container.DataItem)["CreatedOn"].ToString()).ToLongDateString() %>
                                                    </p>
                                                </li>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                </ul>
                                            </FooterTemplate>
                                        </asp:Repeater>
                                    </ContentTemplate>
                                </ajaxToolkit:Accordion>

and below is the javascript event that i attach to the list items that show the comments to be moderated. Just that click events on them don’t work anymore just the mouseover and mouseout.

   //comment restore
        if ($get("<%= accCommentTrash.ClientID%>")) {
            var li = $get("<%= accCommentTrash.ClientID%>").getElementsByTagName("li");
            console.log(li);
            for (iloopCounter = 0; iloopCounter < li.length; iloopCounter++) {
                $addHandlers(li[iloopCounter], {
                    mouseover: ul_li_hover,
                    mouseout: ul_li_hover
                });
                $addHandler(li[iloopCounter],"click",restoreComment);
            }
        }

below is the restore comment function,

function restoreComment(evnt){
console.log(this.name);
console.log(this.id);
}

Now what am i doing wrong, here . Firebug shows me the list of events but the events don’t fire 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:57:16+00:00Added an answer on May 22, 2026 at 11:57 pm

    This was due to the Fact that Accordian had prevented the event from occurring by calling event.preventDefault when method occured. I changed the control to repeater and solved it

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to read the entire contents of a table into memory, as quickly
Not getting into too many specifics, this is a high level question. I've always
I'm just getting into desktop Cocoa development (I have experience with iOS development). If
I'm still learning the proper usage of Knockout and I've found myself quickly getting
I am trying to make improve my programming and getting things drilled into my
I would like to quickly send email from the command line. I realize there
Sometimes I need to quickly extract some arbitrary data from XML files to put
I need to quickly (and forcibly) kill off all external sessions connecting to my
I have quickly read (and will read with more care soon) the article of
I have quickly read over the Microsoft Lambda Expression documentation. This kind of example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.