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

  • SEARCH
  • Home
  • 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 1090697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:24:43+00:00 2026-05-16T23:24:43+00:00

i have a situation where im apending html to load more posts(pagination), and each

  • 0

i have a situation where im apending html to load more posts(pagination), and each post has a reply link, the appened html is not functioning properly:

the jquery post:

$(function () {
    //More Button
    $('.more').live("click", function () {
        var ID = $(this).attr("id");
        if (ID) {
            $("#more" + ID).html('<img src="moreajax.gif" />');

            $.ajax({
                type: "POST",
                url: "ajax_more.php",
                data: "lastmsg=" + ID,
                cache: false,
                success: function (html) {
                    $("ul.statuses").append(html);
                    $("#more" + ID).remove();
                }
            });
        } else {
            $(".morebox").html('The End');
        }

        return false;

    });
});

html file:

return <<<ENDOFRETURN
    <li>
        <a href="nano.com/$username"><img class="avatar" src="images/$picture" width="48" height="48" alt="avatar" /></a>
        <div class="tweetTxt">
            <strong><a href="nano.com/$username">$username</a></strong> $auto
            <div class="date">$rel</div>
            <a class ="reply" href="home.php?replyto=@$username&status_id=$id&reply_name=$username"> reply </a>
        </div>
        <div class="clear"></div>
    </li>
ENDOFRETURN;

the reply link jquery:

function insertParamIntoField(anchor, param, field) {
    var query = anchor.search.substring(1, anchor.search.length).split('&');

    for (var i = 0, kv; i < query.length; i++) {
        kv = query[i].split('=', 2);
        if (kv[0] == param) {
            field.val(kv[1]);
            return;
        }
    }
}

$(function () {
    $("a.reply").click(function (e) {

        insertParamIntoField(this, "status_id", $("#status_id"));
        insertParamIntoField(this, "reply_name", $("#reply_name"));
        insertParamIntoField(this, "replyto", $("#inputField"));

        $("#inputField").focus()
        $("#inputField").val($("#inputField").val() + ' ');

        e.preventDefault();
        return false; // prevent default action
    });
});
  • 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-16T23:24:44+00:00Added an answer on May 16, 2026 at 11:24 pm

    I’m taking a shot in the dark but it sounds like you haven’t used a .live() event on the reply buttons. Any new buttons being appended to the document will not have the click event that you specified for them attached.

    So in short make sure any buttons that are loaded dynamically and need to fire off an event are using a ‘live’ event binding.

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

Sidebar

Related Questions

Pseudo-situation: have a class (let's say BackgroundMagic ), and it has Start() and Stop()
I have situation where I need to make sure that user has completed certain
I have situation in which i'm compelled to retrieve 30,000 records each to 2
I have situation like this: <ul> <li> <a href=#>Link 1</a> <ul> <li><a href=>Sub link</a></li>
is there any limit of POST arguments? I have situation where on dev server
I have situation when GC has no time to delete free objects. The code
i have situation like this: class IData { virtual void get() = 0; virtual
I have situation, where running a query that filters by an indexed column in
I have situation in which I read a record from a database. And if
I have situation where I need to change the order of the columns/adding new

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.