Links Fields in Data Binding

E

Elliot J

Hi all,

I am using some basic HTML to read the contents of a CSV file into a page.
Ie:

<OBJECT id="test" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM NAME="DataURL" VALUE="test.csv">
<PARAM NAME="UseHeader" VALUE="True">
<PARAM NAME="TextQualifier" VALUE=",">
</OBJECT>

<table datasrc=#TEST width="100%">
<thead>
<tr style="font-weight:bold">
<td width="20%">DATE</td>
<td width="80%">EVENT</td>
</tr>
</thead>
<tbody>
<tr>
<td><div datafld="DATE"></div></td>
<td><div datafld="EVENT"></div></td>
</tr>
</tbody>
</table>

What I want to have is an internet link in one column of the data (let's say
the EVENT field for now). Currently, if there is a link reference in my .csv
file, the final page simply displays the HTML code, not the actual link.

Can anyone help me crack this, or point me in the right direction. I have
been mainly learning from
http://msdn2.microsoft.com/en-us/library/ms531385.aspx but I'm not quite
understanding how to achieve what I'm after.

Thanks for any thoughts in advance.

EJ
 
E

Elliot J

David Dorward said:
That isn't "basic HTML', its proprietary Microsoft gubbins.

I'd scrap it all and switch to something along the lines of
http://developer.yahoo.com/yui/datatable/

Hi David,

Thanks for the response, but this looks way more sophisticated than what I
need - admittedly, I've only glanced over the page so far. Additionally, all
the source files are located elsewhere on the internet, which is a problem
as my project is intranet based, and I require it function with as little
dependency on the internet as possible.

EJ
 
D

David Dorward

Thanks for the response, but this looks way more sophisticated than what I
need

But (by using standards) doesn't lock you into a single browser on a
single platform, and (by being published under the BSD license) can be
edited to do whatever you want it to do.
Additionally, all the source files are located elsewhere on the internet

YUI can be downloaded and provided locally rather than using the
central servers.

http://sourceforge.net/project/downloading.php?group_id=165715&filename=yui2.3.0.zip

(This is linked from the YUI homepage).
 
E

Elliot J

David Dorward said:
But (by using standards) doesn't lock you into a single browser on a
single platform, and (by being published under the BSD license) can be
edited to do whatever you want it to do.


YUI can be downloaded and provided locally rather than using the
central servers.

http://sourceforge.net/project/downloading.php?group_id=165715&filename=yui2.3.0.zip

(This is linked from the YUI homepage).

Ah yeah, my bad. I did find the downloable resource pack on my return to the
site. Can't find any examples of dynamically streaming my data from CSV
files though, which is how my users are storing/uploading/maintaining the
data I need to update on my pages. All the examples I've seen so far seem to
expect the data to be pre-defined within the source files, or maybe I just
need to read into it more.

Thanks for your help, once again.
 
D

David Dorward

Ah yeah, my bad. I did find the downloable resource pack on my return to the
site. Can't find any examples of dynamically streaming my data from CSV
files though

Writing a CSV parser in JS shouldn't be too tricky, although it would
probably be a half dozen line program in Perl with the Text::CSV and
JSON modules.
 
B

Ben C

Writing a CSV parser in JS shouldn't be too tricky, although it would
probably be a half dozen line program in Perl with the Text::CSV and
JSON modules.

CSV parsers are harder than they look. You'd think it would just be
s.split(/\s*,\s*/) or something, but CSV has some rather nasty quoting
and/or escaping rules.
 
D

David Dorward

CSV parsers are harder than they look. You'd think it would just be
s.split(/\s*,\s*/) or something, but CSV has some rather nasty quoting
and/or escaping rules.

Harder then they look, but not too hard despite that. I'd certainly
attack it with a tokeniser rather then a regex though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top