Use Ajax with Classic ASP to preview data then update form with javascript url write
 

Classic ASP Active Server Pages Examples, code, tutorials, scriptsAjax with Classic ASP to preview data then update form with javascript generated URL

Thanks to DynamicDrive.com and javascript.internet.com for the Ajax and javascript used here. This is a very sloppy "tutorial" because I don't have time to make it pretty. I am posting what I have done here in case my solution to a need helps someone else.

The code examples are below the table with the screen caps. Scroll down.

I do websites for horse breeders, and I had this challenge:

1. Let people view "hypothetical matings" that put proposed stallion and mare pedigrees together for examination.
2. Fetch existing sire and dam pedigrees from the database to be used in a record for a new horse, so people don't have to re-type the same names over and over.

Using an Ajax script from Dynamic Drive, it was easy to make the proposed pedigree preview. The tricky part was, how to push that data into a form for entering a new horse into the database?

I took a script that redirected viewers to a new url with a select box and combined it with the dropdown box for selecting sires and dams.

Then I used a javascript for splitting the string returned by that, because the original string had too many file names in it. Then I had the javascript reconstruct the url and redirect to the form. The form checks the querystring for the primary keys of sire and dam selections and spits those out into the form for a new horse.

First, you select a sire and select a dam from the database.

 

The select boxes retrieve sires and dams from the database.

After you have selected a sire and dam, they are displayed, via Ajax, as a pedigree for a hypothetical mating.

 

 

If you want to enter the pedigree into the database as a new horse, click confirm and the javascript makes a URL with querystrings and redirects to the form.

I set up my form to retrieve the data for the pedigree from the querystring.

I have not included the new horse form pictured below in this example. 

Put both of the scripts below between the page <head> tags.


<script type="text/javascript">

/***********************************************
* Dynamic Ajax Content- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
var bustcacheparameter=""

function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
if (bustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()

page_request.open('GET', url+bustcacheparameter, true)
//page_request.open('GET', 'http://catchadreamquarterhorses.com/mgr/selecthorses_display.asp?sire=3'+bustcacheparameter, true)
page_request.send(null)
}

function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}

function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}

</script>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore, Editor -->
<!-- Idea by: Selvi Narayanan -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
site = "http://YOURDOMAINNAME.COM"; // Do not include the final "/"
function combineMenus(frm, menu1, menu2) {
with (frm) {
str = menu1.options[menu1.selectedIndex].value;
str += menu2.options[menu2.selectedIndex].value;
//url = site + str + "";
//window.location.href = url;
//document.write (str);

}
 

//here the string that was generated by the script above from the dropdown inputs is split into an array and then the url reconstructed and redirected to
var myString = str;
var mySplitResult = myString.split("selecthorses_display.asp?"); 

for(i = 0; i < mySplitResult.length; i++){
//document.write("<br /> Element " + i + " = " + mySplitResult[i]);
}

myLink = ("/mgr/horse_dataadd.asp?" + mySplitResult[1]);
myLink += ("&" + mySplitResult[2]);
window.location.href = site + myLink;
}


// End -->
</script>

Put the following into the page body.


<!--#include file="db.asp"-->

<font face="Verdana" size="2">Just click the select boxes, and you should see the sire's side load in light blue, and the dam's side load in pink. Then if you want to enter that pedigree into the database, just click "Confirmed!" </font>

<form NAME="SelectParents ID="SelectParents" ACTION="whatever">
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open xDb_Conn_Str

%>
<table border="0">
<tr>
<td width="200%">
<div align="left">
<table border="0" width="429" cellspacing="5" align="left">
<tr>
<td width="150" align="center">
<script type="text/javascript">
/***Combo Menu Load Ajax snippet**/
function ajaxcombo(selectobjID, loadarea){
var selectobj=document.getElementById? document.getElementById(selectobjID) : ""
if (selectobj!="" && selectobj.options[selectobj.selectedIndex].value!="")
ajaxpage(selectobj.options[selectobj.selectedIndex].value, loadarea)
}
</script>
<form name=menufrm>
<select name=menu1 id="ajaxmenu1" size="1" onChange="ajaxcombo('ajaxmenu1', 'contentareaSire'); update();">
<%
x_HORSE_IDList = "<OPTION value=''>Select Sire</OPTION>"
sqlwrk = "SELECT [ID], [Horse_Sire] FROM [HORSE_DATA] ORDER BY [HORSE_NAME] ASC"
Set rswrk = Server.CreateObject("ADODB.Recordset")
rswrk.Open sqlwrk, conn, 1, 2
If Not rswrk.EOF Then
datawrk = rswrk.GetRows
rowswrk = UBound(datawrk, 2)
For rowcntwrk = 0 To rowswrk
x_HORSE_IDList = x_HORSE_IDList & "<OPTION value=selecthorses_display.asp?sire=" & datawrk(0, rowcntwrk) & ""
x_HORSE_IDList = x_HORSE_IDList & ">" & datawrk(1, rowcntwrk) & "</option>"
Next
End If
rswrk.Close
Set rswrk = Nothing
x_HORSE_IDList = x_HORSE_IDList & "</SELECT>"
response.write x_HORSE_IDList
%>
</select>
</td><td width="150" align="center">
<select name=menu2 id="ajaxmenu2" size="1" onChange="ajaxcombo('ajaxmenu2', 'contentareaDam'); update();">
<%
x_HORSE_IDList = "<OPTION value=''>Select Dam</OPTION>"
sqlwrk = "SELECT [ID], [Horse_Dam] FROM [HORSE_DATA] ORDER BY [HORSE_NAME] ASC"
Set rswrk = Server.CreateObject("ADODB.Recordset")
rswrk.Open sqlwrk, conn, 1, 2
If Not rswrk.EOF Then
datawrk = rswrk.GetRows
rowswrk = UBound(datawrk, 2)
For rowcntwrk = 0 To rowswrk
x_HORSE_IDList = x_HORSE_IDList & "<OPTION value=selecthorses_display.asp?dam=" & datawrk(0, rowcntwrk) & ""
x_HORSE_IDList = x_HORSE_IDList & ">" & datawrk(1, rowcntwrk) & "</option>"
Next
End If
rswrk.Close
Set rswrk = Nothing
x_HORSE_IDList = x_HORSE_IDList & "</SELECT>"
response.write x_HORSE_IDList
%>
</select>
</td><td width="90" align="center">
<input type=button value="Confirmed!" onClick="combineMenus(this.form, this.form.menu1, this.form.menu2)" style="font-family: Verdana; font-size: 10pt; font-weight: bold; border-right: 1px solid #000000; border-bottom: 1px solid #000000">
</form>
</center>
</td>
</tr>
</table>
</form>

</div>
</td>
</tr>
<tr>
<td><div id="contentareaSire"></div></td>
</tr>
<tr>
<td><div id="contentareaDam"></div></td>
</tr>
</table>
<p>

<%
' Close recordset and connection

conn.Close
Set conn = Nothing %>

This is the script that retrieves the pedigree data that is shown by Ajax, selecthorsesdisplay.asp

<!--#include file="db.asp"--><%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open xDb_Conn_Str



'start copy sire
if NOT request.querystring("sire") ="" then
strsql = "SELECT * FROM [HORSE_DATA] WHERE [ID]=" & request.querystring("sire")

set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn
If rs.EOF Then
Response.Clear
'Response.Redirect "horse_datalist.asp"
Else
rs.MoveFirst
End If

' Get the field contents
x_Horse_Sire = rs("Horse_Sire")
x_Horse_Paternal_Grandsire = rs("Horse_Paternal_Grandsire")
x_Horse_Paternal_Granddam = rs("Horse_Paternal_Granddam")
x_Horse_Sire_Paternal_Grandsire = rs("Horse_Sire_Paternal_Grandsire")
x_4GGAS = rs("4GGAS")
x_4GGAD = rs("4GGAD")
x_Horse_Sire_Paternal_Granddam = rs("Horse_Sire_Paternal_Granddam")
x_4GGBS = rs("4GGBS")
x_4GGBD = rs("4GGBD")
x_Horse_Sire_Maternal_Grandsire = rs("Horse_Sire_Maternal_Grandsire")
x_4GGCS = rs("4GGCS")
x_4GGCD = rs("4GGCD")
x_Horse_Sire_Maternal_Granddam = rs("Horse_Sire_Maternal_Granddam")
x_4GGDS = rs("4GGDS")
x_4GGDD = rs("4GGDD")

rs.Close
Set rs = Nothing
end if
'end copy sire
'start copy dam
if NOT request.querystring("dam") ="" then
strsql = "SELECT * FROM [HORSE_DATA] WHERE [ID]=" & request.querystring("dam")

set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn
If rs.EOF Then
Response.Clear
'Response.Redirect "horse_datalist.asp"
Else
rs.MoveFirst
End If
x_Horse_Dam = rs("Horse_Dam")
x_Horse_Maternal_Grandsire = rs("Horse_Maternal_Grandsire")
x_Horse_Maternal_Granddam = rs("Horse_Maternal_Granddam")
x_Horse_Dam_Paternal_Grandsire = rs("Horse_Dam_Paternal_Grandsire")
x_4GGES = rs("4GGES")
x_4GGED = rs("4GGED")
x_Horse_Dam_Paternal_Granddam = rs("Horse_Dam_Paternal_Granddam")
x_4GGFS = rs("4GGFS")
x_4GGFD = rs("4GGFD")
x_Horse_Dam_Maternal_Grandsire = rs("Horse_Dam_Maternal_Grandsire")
x_4GGGS = rs("4GGGS")
x_4GGGD = rs("4GGGD")
x_Horse_Dam_Maternal_Granddam = rs("Horse_Dam_Maternal_Granddam")
x_4GGHS = rs("4GGHS")
x_4GGHD = rs("4GGHD")
rs.Close
Set rs = Nothing
end if
'end copy dam
%>
<% if NOT request.querystring("sire")="" then %>
<table border="0" width="99%" cellspacing="0" style="border: 1px solid #808080">
<!-- MSTableType="nolayout" -->
<tr>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="29%"><span id="cb_x_Horse_Sire_Paternal_Grandsire">
<input type="text" name="x_Horse_Sire_Paternal_Grandsire" id="x_Horse_Sire_Paternal_Grandsire" title="" size="30" maxlength="255" value="<%= x_Horse_Sire_Paternal_Grandsire %>"></span></td>
<td bgcolor="#99CCFF" width="5%">
<input type="text" name="x_4GGAS" id="x_4GGAS" title="" size="30" maxlength="25" value="<%= x_4GGAS %>">
<br>
<input type="text" name="x_4GGAD" id="x_4GGAD" title="" size="30" maxlength="25" value="<%= x_4GGAD %>">


</td>
</tr>
<tr>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="33%"><span id="x_Horse_Paternal_Grandsire">
<input type="text" name="x_Horse_Paternal_Grandsire" id="x_Horse_Paternal_Grandsire" title="" size="30" maxlength="255" value="<%= x_Horse_Paternal_Grandsire %>"></span></td>
<td bgcolor="#99CCFF" width="29%">&nbsp;</td>
<td bgcolor="#99CCFF" width="5%">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="29%"><span id="cb_x_Horse_Sire_Paternal_Granddam">
<input type="text" name="x_Horse_Sire_Paternal_Granddam" id="x_Horse_Sire_Paternal_Granddam" title="" size="30" maxlength="255" value="<%= x_Horse_Sire_Paternal_Granddam %>"></span></td>
<td bgcolor="#99CCFF" width="5%">
<input type="text" name="x_4GGBS" id="x_4GGBS" title="" size="30" maxlength="25" value="<%= x_4GGBS %>">
<br>
<input type="text" name="x_4GGBD" id="x_4GGBD" title="" size="30" maxlength="25" value="<%= x_4GGBD %>">


</td>
</tr>
<tr>
<td bgcolor="#99CCFF" width="33%"><span id="cb_x_Horse_Sire">

<input type="text" name="x_Horse_Sire" id="x_Horse_Sire" title="" size="30" maxlength="255" value="<%=x_Horse_Sire%>"></span></td>


<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="29%">&nbsp;</td>
<td bgcolor="#99CCFF" width="5%">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="29%"><span id="cb_x_Horse_Sire_Maternal_Grandsire">
<input type="text" name="x_Horse_Sire_Maternal_Grandsire" id="x_Horse_Sire_Maternal_Grandsire" title="" size="30" maxlength="255" value="<%= x_Horse_Sire_Maternal_Grandsire %>"></span></td>
<td bgcolor="#99CCFF" width="5%">

<input type="text" name="x_4GGCS" id="x_4GGCS" title="" size="30" maxlength="25" value="<%= x_4GGCS%>">
<br>
<input type="text" name="x_4GGCD" id="x_4GGCD" title="" size="30" maxlength="25" value="<%= x_4GGCD %>">


</td>
</tr>
<tr>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="33%"><span id="cb_x_Horse_Paternal_Granddam">
<input type="text" name="x_Horse_Paternal_Granddam" id="x_Horse_Paternal_Granddam" title="" size="30" maxlength="255" value="<%= x_Horse_Paternal_Granddam %>"></span></td>
<td bgcolor="#99CCFF" width="29%">&nbsp;</td>
<td bgcolor="#99CCFF" width="5%">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="33%">&nbsp;</td>
<td bgcolor="#99CCFF" width="29%"><span id="cb_x_Horse_Sire_Maternal_Granddam">
<input type="text" name="x_Horse_Sire_Maternal_Granddam" id="x_Horse_Sire_Maternal_Granddam" title="" size="30" maxlength="255" value="<%= x_Horse_Sire_Maternal_Granddam %>"></span></td>
<td bgcolor="#99CCFF" width="5%">
<input type="text" name="x_4GGDS" id="x_4GGDS" title="" size="30" maxlength="25" value="<%= x_4GGDS %>">
<br>
<input type="text" name="x_4GGDD" id="x_4GGDD" title="" size="30" maxlength="25" value="<%=x_4GGDD%>">


</td>
</tr>
</table><% end if %>

<% if NOT request.querystring("dam")="" then %>

<table border="0" width="99%" cellspacing="0" style="border: 1px solid #808080">
<!-- MSTableType="nolayout" -->
<tr>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="29%"><span id="cb_x_Horse_Dam_Paternal_Grandsire">
<input type="text" name="x_Horse_Dam_Paternal_Grandsire" id="x_Horse_Dam_Paternal_Grandsire" title="" size="30" maxlength="255" value="<%= x_Horse_Dam_Paternal_Grandsire %>"></span></td>
<td bgcolor="#FFCCFF" width="5%">
<input type="text" name="x_4GGES" id="x_4GGES" title="" size="30" maxlength="25" value="<%= x_4GGES %>">
<br>
<input type="text" name="x_4GGED" id="x_4GGED" title="" size="30" maxlength="25" value="<%= x_4GGED%>">


</td>
</tr>
<tr>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="33%"><span id="cb_x_Horse_Maternal_Grandsire">
<input type="text" name="x_Horse_Maternal_Grandsire" id="x_Horse_Maternal_Grandsire" title="" size="30" maxlength="255" value="<%= x_Horse_Maternal_Grandsire %>"></span></td>
<td bgcolor="#FFCCFF" width="29%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="5%">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="29%"><span id="cb_x_Horse_Dam_Paternal_Granddam">
<input type="text" name="x_Horse_Dam_Paternal_Granddam" id="x_Horse_Dam_Paternal_Granddam" title="" size="30" maxlength="255" value="<%= x_Horse_Dam_Paternal_Granddam %>"></span></td>
<td bgcolor="#FFCCFF" width="5%">
<input type="text" name="x_4GGFS" id="x_4GGFS" title="" size="30" maxlength="25" value="<%= x_4GGFS %>">
<br>
<input type="text" name="x_4GGFD" id="x_4GGFD" title="" size="30" maxlength="25" value="<%= x_4GGFD%>">


</td>
</tr>
<tr>
<td bgcolor="#FFCCFF" width="33%"><span id="cb_x_Horse_Dam">

<input type="text" name="x_Horse_Dam" id="x_Horse_Dam" title="" size="30" maxlength="255" value="<%= x_Horse_Dam %>">

</span></td>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="29%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="5%">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="29%"><span id="cb_x_Horse_Dam_Maternal_Grandsire">
<input type="text" name="x_Horse_Dam_Maternal_Grandsire" id="x_Horse_Dam_Maternal_Grandsire" title="" size="30" maxlength="255" value="<%= x_Horse_Dam_Maternal_Grandsire %>"></span></td>
<td bgcolor="#FFCCFF" width="5%">
<input type="text" name="x_4GGGS" id="x_4GGGS" title="" size="30" maxlength="25" value="<%= x_4GGGS %>">
<br>
<input type="text" name="x_4GGGD" id="x_4GGGD" title="" size="30" maxlength="25" value="<%= x_4GGGD %>">


</td>
</tr>
<tr>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="33%"><span id="cb_x_Horse_Maternal_Granddam">
<input type="text" name="x_Horse_Maternal_Granddam" id="x_Horse_Maternal_Granddam" title="" size="30" maxlength="255" value="<%= x_Horse_Maternal_Granddam %>"></span></td>
<td bgcolor="#FFCCFF" width="29%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="5%">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="33%">&nbsp;</td>
<td bgcolor="#FFCCFF" width="29%"><span id="cb_x_Horse_Dam_Maternal_Granddam">
<input type="text" name="x_Horse_Dam_Maternal_Granddam" id="x_Horse_Dam_Maternal_Granddam" title="" size="30" maxlength="255" value="<%= x_Horse_Dam_Maternal_Granddam %>"></span></td>
<td bgcolor="#FFCCFF" width="5%">
<input type="text" name="x_4GGHS" id="x_4GGHS" title="" size="30" maxlength="25" value="<%= x_4GGHS %>">
<br>
<input type="text" name="x_4GGHD" id="x_4GGHD" title="" size="30" maxlength="25" value="<%= x_4GGHD %>"></td>
</tr>
</table>
<p>&nbsp;</p>

<% end if %><%
' Close recordset and connection

conn.Close
Set conn = Nothing %>

 

ASP Examples Menu of Active Server Pages scripts code Classic ASP

Classic ASP Active Server Pages Examples, code, tutorials, scriptsASP Examples Menu (below*)



Active Server Pages | ASP | Scripts | Tutorials | Code | Web Programming | Examples
Active Server Pages ASP code examples, tutorials, and snippets for use in Programming interactive websites.

If you find omissions or errors let me know. I have moved these code samples to their own domain; if you find pieces missing, please let me know.
My favorite scripts site is CODANGO.

*

If any the information I've posted here has been useful to you, please donate.

Quick 'n  easy  dirty PHP script code wizard-generator

Zenphoto RSS XML feed used as data source for javascript slide show with PHP

Classic ASP to archive emails into database and save attached files to folder

PHP Image GD for thumbnails and image resizing with pathing for Windows servers

ODBC database connections for Microsoft Access MDB files with Windows 7: solution posted on this forum.

HTML5 embedded video player "Projekktor" completely skinnable with hyperlinked watermark

Edit web.config to allow Windows iis7 server to handle mp4 files or other mime types as needed

URL rewrite or make friendly URLs for iis7 Windows Server 2008 by editing your web.config file

FACEBOOK API GEEWHIZ - INTEGRATE FACEBOOK WITH YOUR WEBSITE

Use PHP to zip folders for backing up a website

Use PHP to archive emails in database and save attached files to folder

Use PHP with json to check how many hits left on Twitter API

PHP get single record from Access database without catchable fatal error message

PHP to make a bot to send automatic Twitter status updates with Abraham Williams' PHP Oauth Twitter Library

A way to use the PHP Oauth Twitter Library with your Classic ASP scripts for sending status updates

Get user's IP address location for your form results

Tutorial for registering an application with Twitter

Update your Twitter status with Classic ASP and Oauth seamlessly and invisibly without having to login to Twitter. Send status updates programmatically from a web page. PHP example too.

CLASSIC ASP: Cache your Twitter tweets in a database to keep your Twitter xml requests within the rate limit of 350 per hour / PHP VERSION

PHP: Use json to fetch Twitter followers' profiles

Index files content and insert into database for faster searches

Classic ASP with Ajax: secure URL check

Classic ASP with Ajax: referer check

Classic ASP with Ajax: a solution to the ampersand problem in querystrings

Very Simple Star Rating System for Classic ASP

Star Rating System uses CSS and JS adapated for Classic ASP from Yvo Schaap PHP script

XMLhttp with ASP to fetch and save photos from Photobucket account through RSS XML. Can be adapted for Youtube videos to import data to database.

NET image resize can be used to make thumbnails for Classic ASP

Track site visitors, get their ip address geographical data, count page views with Classic ASP

Javascript slideshow with Classic ASP to load image details dynamically from database photos table

Classic ASP with Ajax for rotating banners without page refresh and XML file converted to recordset as banner database
--Variation of the above but fetching a REMOTE XML file as the database
--Variation checks for secure URL and builds absolute URL and makes offsite banner links open in new window

True inline edit Classic ASP datagrid table database edit updating with Ajax SIMPLE EASY without page refresh!

Use Ajax with Classic ASP to preview data then update form with javascript url write

Yvo Schaap's easy inline edit Ajax: an example of using it to inline edit multiple rows of records in Classic ASP

Use Classic ASP to send text messages SMS from your website (Also shows how to use xmlhttp to post form data)

Ajax with Classic ASP for seamless, no page reload database record insertion

Nested SQL Statements to make temporary column names

Multiple records per row with paging

Display multiple records per row

Get ID of newly inserted record, Classic ASP, Access Database

Javascript timer with ASP to keep track of time expired until login expires / timeout session is up

Multiple Javascript event functions triggered from single form onsubmit

Get Querystring key names along with querystring variables

These are out of date but may still be of interest:

ASP Youtube Downloader  Version FOUR
All ASP code. Allows user client side downloads of Youtube videos. You have the option to allow files to be saved directly to your site also.
ASP/PHP video downloader (Works better than ASP for large files)

Use ASP to dynamically parse a Youtube XML playlist to render to html.

Zip up an archive file of your site for backup if you need to restore website with ASP and free Zip Component.

Zip all files in a folder into an archive or backup file dynamically by specific file extension.

Sanitize or clean price cost field for database insertion or display.

Javascript image dimensions and image file size preview.

Put recordset into array, assign keys to the records then use record associated with specific array key as a variable elsewhere.

Access Database Interface Generator Wizard to read your table and field names and to create a table display.

Combining dropdown selection box menu with dynamic ASP database page.

How to redirect user to original page they tried to view before logging, after they are logged in.

Previous/Current/Next Records, or Buddy Ring Script

Custom ASP 404 page not found error script: can also be used for URL rewriting

ASP Example: Combine ASP with Javascript for popup windows
dynamically sized to image dimensions.

ASP Example: How to use ASPJPEG to create thumbnails
Click for free Highly recommended thumbnailer for which you don't need Server access (doesn't seem to work on Windows Server 2008)

ASPjpeg: How to re-scale aspect ratio of thumbnails by height instead of width.

ASP Example: What if your host has an older version of ASPJPEG that doesn't support gifs?

Select Count Distinct Records for Access Database

Upload Image to folder and insert filename into database

Get date in such a way that it can be made part of a file name

Isolate a file name away from its path or extension or strip a path from a file name or strip characters from database field

User-customized on-the-fly stylesheet css files

Enhanced Page Hits Counter (also counts downloads and menu link hits)

Loop through array and compare to string with select case

Aphabetical Paging for your ASP scripts

Web Wiz Guide's Site Searcher Script modified as a file content indexer

Let Users Select How Many Records to View

Access Database for your PayPal IPN scripts

Miscellaneous collected code

From Classic ASP to PHP

You don't have to be a genius, just persistent, to write original Active Server Pages scripts

BuildApp - great old Classic ASP script generator!

Software Recommendation: bare_bones_no_bells_and_whistles_asp_code_generator_database_interface_maker (For PHP I recommend EasyGen.)

If any of this information is helpful to you, please consider donating with the button below. Thanks! ~~Lil