Posted by Brad | Posted in Coding | Posted on 10-06-2011
First create your page on the server that can take a parameter to get some form of data and return matches found, in this case I just want to get a body of text from a database. Note that you want to prevent caching of the response in the browser above the include that supplies the connection string in this classic ASP server side script.
[codesyntax lang="asp" lines_start="1"]
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
<!--#include file="../Connections/yourConnection.asp" -->
ID = Request("ID")
Set cmd = Server.CreateObject ("ADODB.Command")
cmd.ActiveConnection = ConnString
cmd.CommandText = "SELECT TOP 1 Message FROM dbo.Table WHERE ID = " & ID
Set rs = cmd.Execute
If rs.eof = false Then
Set rs = nothing
Below you find the client webpage containing the code required to change the innertext of a textarea to the response returned by the page above. You don’t need to worry about uploading the JQuery API to your server as it’s hosted on Google’s CDN to make it load nice and snappy geographically.
Then the magic happens
Your regular text titles etc will be converted to super antialiased images on the fly in the browser for a super sleek custom font look, great for sites with a DB back end such as this wordpress blog!.
My cufon-config.js on day1 includes just this
But that could change as I play with it more, but for now this is perfect.