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 timesJoin today, and add this to your favorites.
Share With Friends (Updated 6-8-2010)
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«
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