Home
About
Contact
Categories
Classic ASP (28 - Sub-Categories)
CSS (1 - Sub-Category)
JavaScript (4 - Sub-Categories)
Databases (22 - Sub-Categories)
ASP.NET (23 - Sub-Categories)
Delphi (5 - Sub-Categories)
Windows Server Core (3 - Sub-Categories)
VMWare (1 - Sub-Category)
Code Editing Tools (2 - Sub-Categories)
Linux (2 - Sub-Categories)
Dell Servers (15 - Sub-Categories)
Bug Reports
(Bugs Fixed
New CFFCS Coding Source is still in Beta
Please report any errors to the [Contact] page. Thank you.
Classic ASP (28)
CSS (1)
JavaScript (4)
Databases (22)
ASP.NET (23)
Delphi (5)
Windows Server Core (3)
VMWare (1)
Code Editing Tools (2)
Linux (2)
Dell Servers (15)
Resources
[View The Source Code For This Project]
Format SQL Script
Classic ASP
Queries
Twitter Style Load More Results with jQuery and Ajax in Classic ASP & SQL Server
Live Editing Disabled for Server-Side Example
HTML
Twitter Style Load More Results with jQuery and Ajax in Classic ASP & Access (or) SQL Server
ID | URL & Description
<% Set sqlStaff = CreateObject("ADODB.Command") sqlStaff.ActiveConnection=objConn sqlStaff.Prepared = true sqlStaff.commandtext = "SELECT ID, LoadTitle, LoadURL, LoadText, DATEDIFF(second, LoadDate, getdate()) as timestamps, LoadDate from LoadIt ORDER BY LoadDate DESC" set rsProCom = sqlStaff.execute while not rsProCom.eof and counter < 5%>
[<%=rsProCom("id")%>] =
" title="<%=rsProCom("LoadTitle")%>"><%=rsProCom("LoadTitle")%>
<%=rsProCom("LoadText")%>
(<%=rsProCom("LoadDate")%>)
<%counter = counter + 1 rsProCom.movenext wend%>
" class="morebox">
">more
<%rsProCom.close set rsProCom=nothing%>
CSS
@charset "utf-8"; /* CSS Document */ body { margin: 0px; font-size: 100%; font-family: Verdana, Arial, Helvetica, Sans-Serif; background-color:fff; color:#000; font-size:12px; background-repeat:repeat-x; } a:link, a:link font, a:active, a:active font, a:visited, a:visited font{ font-family: Arial; font-size: 12px; color:#3C3C3C; text-decoration: none; } a:hover{ text-decoration:overline underline; } * { margin:0px; padding:0px } ol.timeline { list-style:none } ol.timeline li{ position:relative; border-bottom:1px #dedede dashed; padding:8px; } ol.timeline li:first-child{} .morebox { font-weight:bold; color:#333333; text-align:center; border:solid 1px #333333; padding:8px; margin-top:8px; margin-bottom:8px; -moz-border-radius: 6px;-webkit-border-radius: 6px; } .morebox a{ color:#333333; text-decoration:none} .morebox a:hover{ color:#333333; text-decoration:none} #container { margin-left:60px; width:580px }
JavaScript
Load.js
// JavaScript Document // Top code provided by Liran Barniv // https://stackoverflow.com/a/31730741/2031172 jQuery.fn.extend({ live: function (event, callback) { if (this.selector) { jQuery(document).on(event, this.selector, callback); } return this; } }); $(function() { //More Button $('.more').live("click",function() { var ID = $(this).attr("id"); if(ID) { $("#more"+ID).html('
'); $.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; }); });
SQL
Virtual-Class-01
USE [Virtual-Class-01] GO /****** Object: Table [dbo].[LoadIt] Script Date: 10/25/2022 10:33:46 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[LoadIt]( [ID] [int] IDENTITY(1,1) NOT NULL, [LoadURL] [nvarchar](150) NULL, [LoadTitle] [nvarchar](150) NULL, [LoadText] [nvarchar](150) NULL, [LoadDate] [datetime] NULL, CONSTRAINT [PK_LoadIt] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO SET IDENTITY_INSERT [dbo].[LoadIt] ON GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (1, N'www.cffcs.com', N'CFF Coding Source', N'CFF Coding Source is the primary company design site for Carrz-Fox-Fire Promotions', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (2, N'www.cffkb.com', N'Knowledge Base', N'Knowledge Base (Internet inforamtion Knowledge Base)', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (3, N'www.darkeffects.com', N'Dark Effects Productions', N'Dark Effects Productions, is a film company by Carrz-Fox-Fire Promotions', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (4, N'www.waynebarron.com', N'Author Wayne Barron Blog', N'This is the Blog site for Author Wayne Barron', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (5, N'www.cffspotlight.com', N'Spotlight is on You', N'This website is an article based site similar to Wikipedia', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (6, N'www.cffpics.com', N'CFF Pics', N'CFF Pics Image hosting for all of Carrz-Fox-Fire Promotions sites', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (7, N'www.cffradio.com', N'CFF Radio', N'CFF Radio is the future ', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (8, N'www.cffsub.com', N'CFF Subs', N'CFF Subs is for Gig workers to keep up with their expenses.', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (9, N'ee.cffcs.com', N'Experts Exchange (Carrzkiss Articles)', N'Experts Exchange Knowledge as tutorials that Carrzkiss has provided.', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (10, N'www.ericcarr.info', N'Eric Carr Tribute', N'This site is dedicated to the late Eric Carr from KISS', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (11, N'sec.cffcs.com', N'Security for CFF Sites', N'Security for CFF Sites', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO INSERT [dbo].[LoadIt] ([ID], [LoadURL], [LoadTitle], [LoadText], [LoadDate]) VALUES (12, N'watch.darkeffects.com', N'Dark Effects Productions Videos', N'Where to Watch all Dark Effects Productions Video Lessons.', CAST(N'2022-04-18T00:00:00.000' AS DateTime)) GO SET IDENTITY_INSERT [dbo].[LoadIt] OFF GO
Classic ASP
ACN.asp
Ajax_more.asp
getTime.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% siteurl = "192.168.2.12/cs" getServer = "sqlcorecs-01" getInstance = "sql2019" getID = "testuser" getPW = "testuser" Set objConn = CreateObject("ADODB.Connection") objConn.Open("Provider=SQLOLEDB; Data Source="&getServer&"\"&getInstance&"; Initial Catalog=Virtual-Class-01;User ID="&getID&";Password="&getPW&";") ' to prevent SQL and XSS Injection against your database and your site ' updated: January, 7th 2010 Function ProtectSQL(SQLString) SQLString = Replace(SQLString, "'", "''") ' replace single Quotes with Double Quotes SQLString = Replace(SQLString, ">", ">") ' replace > with > SQLString = Replace(SQLString, "<", "<") ' replace < with < SQLString = Replace(SQLString, "(","(") ' replace ( with ( SQLString = Replace(SQLString, ")",")") ' replace ) with ) SQLString = Trim(SQLString) ProtectSQL = SQLString End Function %>
<% Set sqlStaff = CreateObject("ADODB.Command") sqlStaff.ActiveConnection=objConn sqlStaff.Prepared = true getID = request("lastmsg") sqlStaff.commandtext = "SELECT ID, LoadTitle, LoadURL, LoadText, DATEDIFF(second, LoadDate, getdate()) as timestamps, LoadDate from LoadIt where id>? ORDER BY LoadDate DESC" sqlStaff.Parameters.Append sqlStaff.CreateParameter("@id", 3, 1, , getID) set rsProCom = sqlStaff.execute %> <%while not rsProCom.eof and counter < 5%>
[<%=rsProCom("id")%>] =
" title="<%=rsProCom("LoadTitle")%>"><%=rsProCom("LoadTitle")%>
<%=rsProCom("LoadText")%>
(<%=rsProCom("LoadDate")%>)
<%counter = counter + 1 rsProCom.movenext wend%> <%if rsProCom.eof then%>
End of Records<%else%>
" class="morebox">
">more
<%end if%> <%'end if%>
<% days2 = int(rsProCom("timestamps") / (60 * 60 * 24)) remainder = rsProCom("timestamps") mod (60 * 60 * 24) hours = int(remainder / (60 * 60)) remainder = remainder mod (60 * 60) minutes = int(remainder / (60)) seconds = remainder mod (60) if(days2 >=1) then GDP = DateDiff("d", rsProCom("loaddate"),now()) response.Write "posted: "&GDP &" days ago" elseif(DateDiff("d", rsProCom("loaddate"),now)<>0) then response.Write"posted: yesterday " &rsProCom("loaddate") elseif(hours > 0) then response.Write "posted: "&hours& " hours ago" 'elseif(minutes = 0)then ' response.Write "posted: "&hours& " hours ago" elseif (minutes <> 0) then response.Write "posted: "&minutes& " minutes ago" else response.Write "posted: few seconds ago" end if response.Write "
" %>
Preview
Tags
twitter style load more
classic asp load more
classic asp twitter style load more