Can somehelp me, the question is two parts!


Firstly - How can I get the Tiltle's of the fields to display as well as the data?
i.e

Tile. Artist.


Secondly- How can I get the data to display on a new page only.




<script language="vbscript">

' create the file system object
set fso = CreateObject("Scripting.FileSystemObject")

'load the file
set f = fso.GetFile("data/test.htm")

sub readfileback

Const ForReading = 1, ForWriting = 2, ForAppending = 8



set ts = f.OpenAsTextStream(ForReading, -2)

thestring = "<table bgcolor='white' cellspacing=1 cellpadding=3>"

Do While not ts.AtEndOfStream
textline = ts.ReadLine
myArray = Split(textline,",")
if UBound(myArray) > 0 Then
if myArray(0) <> "" Then
thestring = thestring & "<tr bgcolor='blue'>"
For i = 0 To UBound(myArray)
thestring = thestring & "<td>" & myArray(i) & "</td>"
Next
thestring = thestring & "</tr>"
end if
end if
Loop

thediv.innerHTML = thestring
ts.close
end sub





Sub createtextfile
Const ForReading = 1, ForWriting = 2, ForAppending = 8

Set a = f.OpenAsTextStream(ForAppending, -2)
a.WriteLine(theform.title.value & "," & theform.artist.value & "," & theform.album.value & "," & theform.number.value)
a.Close
theform.title.value=""
theform.artist.value=""
theform.album.value=""
theform.number.value=""
readfileback
end sub
</script>

<body onload="readfileback">
<form name="theform">

&nbsp;
<div align="center">
<center>
<table border="0" width="280" height="39">
<tr>
<td width="107" height="7" align="right">

<b><font color="#006699">

Title:&nbsp;</font></b></td>
<td width="3" height="7" align="left">

</td>
<td width="147" height="7" align="left"> <input type="text" name="title">
</td>
</tr>
<tr>
<td width="107" height="6" align="right">
<b><font color="#006699">
Artist :&nbsp;</font></b></td>
<td width="3" height="6" align="left">
</td>
<td width="147" height="6" align="left"> <input type="text" name="artist">
</td>
</tr>
<tr>
<td width="107" height="5" align="right">
<b><font color="#006699">
Album :&nbsp;</font></b></td>
<td width="3" height="5" align="left">
</td>
<td width="147" height="5" align="left"> <input type="text" name="album">
</td>
</tr>
<tr>
<td width="107" height="5" align="right">
<b><font color="#006699">
Number:</font></b> </td>
<td width="3" height="5" align="left">
</td>
<td width="147" height="5" align="left"> <input type="text" name="number">
</td>
</tr>
</table>
</center>
</div>
<p align="center">
<br>
<input type="button" value="a d d" name="thebutton" onclick="createtextfile">
</p>
</form>



<div id="thediv"></div>
</body>