PDA

View Full Version : Go Easy On Me (Server Table)


TNO
05-17-2006, 03:30 AM
I'm a 100% JavaScript/VBScript programmer and have never touched PHP before. I've just recently gotten a website (a real one). The server is ASP allergic so anything server side requires PHP it seems.

So on to the point of all this, I need a simple way to update a csv/table on my website for all users to see in a format given in the example. If my explanation made no sense, hopefully the example will


<html>
<head>
<title>Role Call</title>

<style>
<!--
A {text-decoration: none}
a:hover{color:red}
//-->
</style>

</head>

<body link="blue" alink="red" vlink="blue" bgcolor="black" text="green">
<OBJECT ID="MainDB" NAME="MainDB" CLASSID="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM NAME="DataURL" VALUE="members.txt">
<PARAM NAME="UseHeader" VALUE="TRUE">
<PARAM NAME="TextQualifier" VALUE="~">
<PARAM NAME="FieldDelim" VALUE="|">
</OBJECT>

<center>
<TABLE DATASRC="#MainDB" CELLPADDING="0" CELLSPACING="0" BORDER="2">
<THEAD>
<TH BGCOLOR=#333366><A HREF='Javascript:colSort("Name")'>Name</a></TH>
<TH BGCOLOR=#333366><A HREF='Javascript:colSort("Status")'>Status</a></TH>
<TH BGCOLOR=#333366><A HREF='Javascript:colSort("Details")'>Details</a></TH>
</THEAD>
<TBODY>
<TR>
<TD BGCOLOR="#EEEECC"><SPAN DATAFLD="Name"></SPAN></TD>
<TD BGCOLOR="#EEEECC"><SPAN DATAFLD="Status" DATAFORMATAS="html"></SPAN></TD>
<TD BGCOLOR="#EEEECC"><SPAN DATAFLD="Details" DATAFORMATAS="html"></SPAN></TD>
</TR>
</TBODY>
</TABLE>
</center>
<SCRIPT type="text/javascript">
<!--
var tdcobj=document.all.MainDB;

function colSort(varColumn){
//Check to see if we are sorting on the same column
//If so assume user simply wishes to invert sort order
if (varColumn == tdcobj.SortColumn)
{
//Invert order
tdcobj.SortAscending = !tdcobj.SortAscending;
}
else
{
//Use current sort order for new column sort
tdcobj.SortColumn = varColumn;
}
tdcobj.Reset();
}
//-->
</script>
</body>
</html>


The Related text file:


Name|Status|Details
-TNO-|<select><option>-Present-</option><option>Absent</option></select>|<input type="text" value="On Vacation">
Munak_Luna|<select><option>-Present-</option><option>Absent</option></select>|<input type="text" value="Still Here">


Any help you could provide would be appreciated.