Hi, All
I'm looking to convert this javascript to ASP (VBScript) does anyone know the best way to do this?
this is the Javascript code that works fine for me, but i'd sooner have ASP(VBscript) do the job. I
still need it to write to the div tag only
the list in a js file (list.js)
the function
the html on the page
i was thinking of putting the list.js in a text file ($o~image~data~data~data~data$f~image2~data~data~data~data) and
using fs.OpenTextFile() to get the text then split and write it with some more asp like the javascript does, If i was to
give this alot of thought i'd probably stay with the javascript version, but i wouldn't learn new things if i did that.
Thanks For Reading
I'm looking to convert this javascript to ASP (VBScript) does anyone know the best way to do this?
this is the Javascript code that works fine for me, but i'd sooner have ASP(VBscript) do the job. I
still need it to write to the div tag only
the list in a js file (list.js)
Code:
var s="$o~image~data~data~data~data$f~image2~data~data~data~data";
the function
Code:
function dolist() {
var listings = s.split("$");
for(i=1; i<listings.length; i++){
listing = listings[i].split("~");
listings[i]={
css: listing[0],
listImage: listing[1],
title: listing[2],
Time: listing[3],
age: listing[4],
listID: listing[5]
}
}
var list = document.getElementById("list");
var txt = "<table cellSpacing=0 cellPadding=0 width='720' border=0 align=left>";
for(i=1; i<listings.length; i++){
txt += "<tr><td width=20% class="+listings[i].css+"><img src='image/"
+listings[i].listImage+"b.jpg' height=60></td><td width=40% class="+listings[i].css+">"
+listings[i].title+"</td><td width=15% class="+listings[i].css+">"
+listings[i].Time+"</td><td width=15% class="+listings[i].css+">"
+listings[i].age+"</td><td width=10% class="+listings[i].css+">"
+listings[i].listID
+"</td></tr>";
}
txt += "</table>";
list.innerHTML = txt;
}
the html on the page
Code:
<script src="list.js"></script>
MORE HTML
<div id="list" style='width:740;height:410'>
</div>
MORE HTML
i was thinking of putting the list.js in a text file ($o~image~data~data~data~data$f~image2~data~data~data~data) and
using fs.OpenTextFile() to get the text then split and write it with some more asp like the javascript does, If i was to
give this alot of thought i'd probably stay with the javascript version, but i wouldn't learn new things if i did that.
Thanks For Reading