Go Back To List
ASP Classic & JQuery
Twitter Style Load More Results with jQuery and Ajax in Classic ASP & Access (or) SQL Server
Next Article
Check if usename is taken (ASP Classic and JQuery)
Coding Article #: 10 - Published On: March 04, 2011 @ 09:14:42 AM - Last Updated on: July 13, 2012
This article has been Favorited 93 times
Join today, and add this to your favorites.
Coding Source - Share on MySpace Coding Source - Share With Facebook Coding Source - Share on Twitter Coding Source - Share on Reddit Coding Source - Share on Digg It Coding Source - Share on Stumble Upon It Coding Source - Share on Delicious
Share With Friends (Updated 6-8-2010)

Supported Files
File Download:
carrzkiss_034748load.zip
File Size: 21.12 KB
Unzip with
Download winzip today!(OR)
Screenshot of Source Code
Coding Source - Twitter Style Load More Results with jQuery and Ajax in Classic ASP & Access (or) SQL Server
Load More...
Load more record results from your database without having to load another page, or deal with a paging system.

The code below is the JavaScript that makes the whole thing come together.
The downloadable zip file has all the files that are needed including the sample Access Database.
The only thing that you will need to do to make this code work with SQL Server is to change the connection from Access to your SQL Server database within the ACN.asp file.
Once this is changed over and you properly add in your columns for the SQL Server database
And the recordset for the URL's and text information, the script should run without issue.

Good Luck

Example: View Live Example«


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>

<script type="text/javascript">
    $(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.asp",
                    data: "lastmsg=" + ID,
                    cache: false,
                    success: function(html) {
                        $("ol#updates").append(html);
                        $("#more" + ID).remove();
                    }
                });
            } else {
                $(".morebox").html('The End');
            }
            return false;
        });
    });
</script>



Post to Facebook about: Twitter Style Load More Results with jQuery and Ajax in Classic ASP & Access (or) SQL Server