You are here: irt.org | FAQ | JavaScript | File | Q1189 [ previous next ]
Say you have a data.txt file containing:
Number,Text,Date,Name,Url 100,abc,19971104,Me,<a href="http://www.irt.org">irt.org</a> 400,zzz,19961003,You,<a href="http://www.microsoft.com">Microsoft</a> 300,fox,19950902,Them,<a href="http://developer.netscape.com">Netscape</a> 50,bad,19981201,Us,<a href="http://www.amazon.com">Amazon.com</a>
You can include a last column containing a url with:
<html> <body bgcolor = "#ffffff"> <object id="dataBindId" classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"> <param name="DataURL" value="data.txt"> <param name="UseHeader" value="true"> </object> <center> <table border=1 datasrc="#dataBindId"> <thead> <form> <th><input type="button" value="Number" onClick="document.all.dataBindId.sort='Number';dataBindId.Reset();"></th> <th><input type="button" value=" Text " onClick="document.all.dataBindId.sort='Text';dataBindId.Reset();"></th> <th><input type="button" value=" Date " onClick="document.all.dataBindId.sort='Date';dataBindId.Reset();"></th> <th><input type="button" value=" Name " onClick="document.all.dataBindId.sort='Name';dataBindId.Reset();"></th> <th><input type="button" value=" URL "></TH> </form> </thead> <tbody> <td><div datafld="Number">Number Here</div></td> <td><div datafld="Text">Text Name Here</div></td> <td><div datafld="Date">Date Here</div></td> <td><div datafld="Name">Name Here</div></td> <td><div datafld="Url" dataformatas="html">Url Here</div></td> </tbody> </table> </center> </body> </html>
The important part is the dataformatas attribute, which has a value of "html".