View previous topic :: View next topic |
Author |
Message |
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
Posted: Tue Nov 11, 2003 4:32 am Post subject: ASP noobie...I need a total walkthru on ASP |
|
|
Im trying to replace the default Automatic Directory Indexing built in with a program called AutoSite v1.1. I've got no idea what to do or what to install. Ive got the code i need to put into my site, but i dont quite know how to apply it. |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Nov 13, 2003 3:44 am Post subject: Re: ASP noobie...I need a total walkthru on ASP |
|
|
stuntedheight,
Can you give us an URL from which we can download this script? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
Posted: Tue Nov 18, 2003 1:58 am Post subject: |
|
|
i can post the entire thing up... |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Nov 18, 2003 8:29 pm Post subject: |
|
|
stuntedheight wrote: | i can post the entire thing up... |
Or send it to support@aprelium.com with a little explanation of the problem. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
|
Back to top |
|
|
mcwilliams132 -
Joined: 27 Jul 2003 Posts: 167 Location: Oshkosh, WI
|
Posted: Wed Nov 19, 2003 7:37 pm Post subject: |
|
|
unfortunatly...you cannot post an ASP file for viewing the source...since the CGI app AHTML parses the info and returns it as pure HTML...we'll never see the source by doing a view source.
you'll need to phyically post the script in a text doc or as text into an HTML document. _________________ ::::::::::::::::::::::::::::::::::::::::::::::::::
:: Jon-Paul LeClair
:: http://mcwilliamsworld.com
:: "Lobster sticks to magnet!" |
|
Back to top |
|
|
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
Posted: Thu Nov 20, 2003 12:46 am Post subject: |
|
|
Like I said, Im a noobie
<HTML>
<HEAD>
<SCRIPT Language = "JavaScript">
// global variables
var g_iCol;
var g_iLastCol = -1;
var g_iSortDir = 1;
//===============================================================================
// dates()
// Determines how the date by year/month/day
//===============================================================================
function dates(datea,dateb)
{
var yeara = 1 * datea.substring(6,10);
var yearb = 1 * dateb.substring(6,10);
if (yeara > yearb) return true;
if (yeara < yearb) return false;
var montha = 1 * datea.substring(0,2);
var monthb = 1 * dateb.substring(0,2);
if (montha > monthb) return true;
if (montha < monthb) return false;
var daya = 1 * datea.substring(3,5);
var dayb = 1 * dateb.substring(3,5);
if (daya > dayb) return true;
if (daya < dayb) return false;
return false;
}
//===============================================================================
// splitRows()
// Determines how many "Folder" rows and "File" rows there are to separate sorting
//===============================================================================
function splitRows(iCol, sTable, iStart)
{
var iFolders = 0
var iFiles = 0
var objTable = document.getElementById(sTable)
var objRow = objTable.getElementsByTagName("tr")
for(i=0; i<objRow.length; i++)
{
if(objRow.item(i).id == "Folder")
{
iFolders = iFolders + 1
}
}
iEnd = objRow.length - (iStart + iFolders)
if(iFolders > 0)
{
sTempLCol = g_iLastCol;
sTempDir = g_iSortDir;
sortTable(iCol, sTable, iStart, iEnd)
iStart = iStart + iFolders
iEnd = 0
g_iLastCol = sTempLCol;
g_iSortDir = sTempDir;
sortTable(iCol, sTable, iStart, iEnd)
}
else
{
iEnd = 0
sortTable(iCol, sTable, iStart, iEnd)
}
}
//===============================================================================
// sortTable()
// The reasons we specify a start and end is because we might be listing folders
// in addition to files so we want to sort the folders first then sort the files
// all in the same table.
// PARAMETERS
// iCol - Column index to sort.
// sTable - name/id of table to sort.
// iStart - row to start sorting.
// iEnd - row to stop sorting.
//===============================================================================
function sortTable(iCol, sTable, iStart, iEnd) {
var tbl = document.getElementById(sTable);
var tblBody = tbl.getElementsByTagName("tbody").item(0);
var tblRows = tblBody.getElementsByTagName("tr");
var arr = new Array( (tblRows.length - iEnd) - iStart );
for ( i=iStart; i<tblRows.length - iEnd; i++)
{
arr[i-iStart] = tblRows[i].cloneNode(true);
}
g_iCol = iCol;
if (g_iLastCol==iCol)
g_iSortDir *= -1;
else
g_iSortDir = 1;
g_iLastCol=iCol;
if(iCol > 0)
{
if(iCol > 1)
arr.sort(sortCompareThirdCol);
else
arr.sort(sortCompareSecondCol);
}
else
{
arr.sort(sortCompareFirstCol);
}
for ( i=iStart; i < tblRows.length - iEnd; i++) {
tblBody.replaceChild( arr[i-iStart].cloneNode(true), tblRows[i] );
}
if (document.getElementById && ! document.all) {
var oNodeList = tblBody.getElementsByTagName("tr");
var szId;
for (var i=0;i<oNodeList.length;i++) {
szId = oNodeList.item(i).id;
if (szId.indexOf("tr") != -1) oNodeList.item(i).onclick = doselect;
}
}
}
//===============================================================================
// sortCompareFirstCol()
// Determines which value to place first. For the first column this is examined
// differently from other columns since it will contain hrefs.
//===============================================================================
function sortCompareFirstCol( val1, val2 ) {
var cells1= val1.getElementsByTagName("a").item(0).childNodes[0].nodeValue;
var cells2= val2.getElementsByTagName("a").item(0).childNodes[0].nodeValue;
cells1 = cells1.toUpperCase()
cells2 = cells2.toUpperCase()
if ( !cells1 || !cells2 ||
g_iCol < 0 ||
cells1.length <= g_iCol ||
cells2.length <= g_iCol )
{
return 0;
}
if ( cells1 < cells2)
return -1*g_iSortDir;
if ( cells1 > cells2)
return g_iSortDir;
return 0;
}
//===============================================================================
// sortCompareSecondCol()
// Determines which value to place first. This looks at numeric values.
//===============================================================================
function sortCompareSecondCol(val1, val2) {
var cells1= val1.getElementsByTagName("td");
var cells2= val2.getElementsByTagName("td");
if ( !cells1 || !cells2 ||
g_iCol < 0 ||
cells1.length <= g_iCol ||
cells2.length <= g_iCol )
{
return 0;
}
if (1 * cells1[g_iCol].childNodes[0].nodeValue > 1 * cells2[g_iCol].childNodes[0].nodeValue)
return -1*g_iSortDir;
else
return g_iSortDir;
return 0;
}
//===============================================================================
// sortCompareThirdCol()
// Determines which value to place first. This looks at date values.
//===============================================================================
function sortCompareThirdCol(val1, val2) {
var cells1= val1.getElementsByTagName("td");
var cells2= val2.getElementsByTagName("td");
if ( !cells1 || !cells2 ||
g_iCol < 0 ||
cells1.length <= g_iCol ||
cells2.length <= g_iCol )
{
return 0;
}
if (dates(cells1[g_iCol].childNodes[0].nodeValue,cells2[g_iCol].childNodes[0].nodeValue) == true)
return -1*g_iSortDir;
else
return g_iSortDir;
return 0;
}
//===============================================================================
// RowClick(); RowHover(); RowOut();
// Table row mouseovers for aesthetics.
//===============================================================================
function RowClick(sID)
{
var rName
var lName
rName= sID.innerHTML
objList = document.getElementById("List")
for(i = 0; i < objList.rows.length; i++)
{
if(objList.rows[i].innerHTML == rName)
{
lName = objList.rows[i].cells[0].innerHTML
lName = lName.split("\"")
top.location = lName[1]
}
}
}
function RowHover(sID)
{
if(sID.id == "Folder")
sID.bgColor = "#000000"
else
sID.bgColor = "#000000"
}
function RowOut(sID)
{
if(sID.id == "Folder")
sID.bgColor = "#123456"
else
sID.bgColor = "#123456"
}
</SCRIPT>
<TITLE>SGenerated</TITLE>
</HEAD>
<BODY bgcolor="#333333" text="#FFFFFF" link="#FF9933" vlink="#FF9933" alink="#FF9933">
<STYLE>
TD.info
{
CURSOR: hand;
BORDER-LEFT: none;
BORDER-RIGHT: none;
BORDER-TOP: none;
}
TABLE.currTable
{
BORDER: none;
}
</STYLE>
<TABLE Class="currTable" id="List" width=100% border=1 cellspacing=0 cellpadding=3>
<TR>
<TD Class="info"><A HREF=JavaScript:splitRows(0,"List",1)><B>File Name</B></A></TD>
<TD Class="info"><A HREF=JavaScript:splitRows(1,"List",1)><B>File Size</B></A></TD>
<TD Class="info"><A HREF=JavaScript:splitRows(2,"List",1)><B>File Date</B></A></TD>
</TR>
<TR Class="info" id="Folder" bgColor = "#123456" onClick="RowClick(this)" onMouseOver="RowHover(this)" onMouseOut="RowOut(this)" >
</BODY>
</HTML> |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Nov 21, 2003 1:58 am Post subject: |
|
|
stuntedheight,
The code you posted contains no ASP instructions. Are you sure it is the full source code of the script? For your information, downloading a page resulting from a script won't save the script. It will only save the page generated by the script. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
Posted: Mon Nov 24, 2003 2:39 pm Post subject: |
|
|
I'm using this program (AutoSite) to make this code. I tell it what directorty i want it to make these files. I hit go. And it puts this code in each of those files. This is all i have to give you...Sorry |
|
Back to top |
|
|
mcwilliams132 -
Joined: 27 Jul 2003 Posts: 167 Location: Oshkosh, WI
|
Posted: Mon Nov 24, 2003 7:13 pm Post subject: |
|
|
I'm guessing you got this PERL script from:
http://modzer0.cs.uaf.edu/~hartsock/PERL/AutoSite.html
you need PERL installed in order for this to run.
Aprelium has instructions on the home page regarding this. _________________ ::::::::::::::::::::::::::::::::::::::::::::::::::
:: Jon-Paul LeClair
:: http://mcwilliamsworld.com
:: "Lobster sticks to magnet!" |
|
Back to top |
|
|
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
Posted: Tue Nov 25, 2003 2:30 am Post subject: |
|
|
No, that isnt the same AutoSite. You can find AutoSite 1.1 here at http://www.empiresource.com/index.html. Heres the description of the program...
Quote: | AutoSite 1.1
-----------------------------------------------
Automatically generate HTML/ASP web pages listing the files from any directory on your hard drive.
AutoSite was developed as a tool to help web developers build file lists rapidly without the need for manual data entry. This tool can be used to create HTML or ASP web pages that lists your music, photos, documents, or any file type you choose.
The AutoSite software will go into the directory you specify and list all files contained within it, create links to the subfolders and list all files in the subfolders by file extension that you specify. The end result is an HTML/ASP table with links to the each file and subfolder, rendered automatically by AutoSite. The pages will contain the necessary HTML/ASP and JavaScript code so your lists can be sorted and color coded to distinguish the differences between folders and files. HTML can be written around the generated code to fully customize your pages.
AutoSite leaves you with more time to focus on other key elements of your site, eliminates the need for a database and database maintenance, and fractionalizes the time spent on manually entering names and links for your files.
After the pages have been created, it becomes very easy to upload your files to your web server and instantly have access to those files from anywhere on the internet.
Absolutely no programming skills are required to create fully functional web pages, using this software. The default values and included code set in the program will contain everything you need for building directory list web pages.
|
|
|
Back to top |
|
|
mcwilliams132 -
Joined: 27 Jul 2003 Posts: 167 Location: Oshkosh, WI
|
Posted: Tue Nov 25, 2003 7:42 pm Post subject: |
|
|
thanks for posting the actual site.
I'd suggest reading through the documentation :
http://www.empiresource.com/documentation.htm
There is also a note stating that there is a known problem with IE 5.5 due to a bug with a Javascript sort function... _________________ ::::::::::::::::::::::::::::::::::::::::::::::::::
:: Jon-Paul LeClair
:: http://mcwilliamsworld.com
:: "Lobster sticks to magnet!" |
|
Back to top |
|
|
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
Posted: Wed Nov 26, 2003 12:01 am Post subject: |
|
|
Already read through that... |
|
Back to top |
|
|
|