Links Fields in Data Binding

Discussion in 'HTML' started by Elliot J, Aug 7, 2007.

  1. Elliot J

    Elliot J Guest

    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
     
    Elliot J, Aug 7, 2007
    #1
    1. Advertising

  2. David Dorward, Aug 7, 2007
    #2
    1. Advertising

  3. Elliot J

    Elliot J Guest

    "David Dorward" <> wrote in message
    news:...
    > On Aug 7, 5:36 pm, "Elliot J" <> wrote:
    >> I am using some basic HTML to read the contents of a CSV file into a
    >> page.

    >
    > 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/
    >
    > --
    > David Dorward
    > http://dorward.me.uk/
    > http://blog.dorward.me.uk/


    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
     
    Elliot J, Aug 8, 2007
    #3
  4. On Aug 8, 8:46 am, "Elliot J" <> wrote:
    > 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).

    --
    David Dorward
    http://dorward.me.uk/
    http://blog.dorward.me.uk/
     
    David Dorward, Aug 8, 2007
    #4
  5. Elliot J

    Elliot J Guest

    "David Dorward" <> wrote in message
    news:...
    > On Aug 8, 8:46 am, "Elliot J" <> wrote:
    >> 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).
    >
    > --
    > David Dorward
    > http://dorward.me.uk/
    > http://blog.dorward.me.uk/


    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.
     
    Elliot J, Aug 8, 2007
    #5
  6. On Aug 8, 9:25 am, "Elliot J" <> wrote:

    > 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.

    --
    David Dorward
    http://dorward.me.uk/
    http://blog.dorward.me.uk/
     
    David Dorward, Aug 8, 2007
    #6
  7. Elliot J

    Ben C Guest

    On 2007-08-08, David Dorward <> wrote:
    > On Aug 8, 9:25 am, "Elliot J" <> wrote:
    >
    >> 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.


    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.
     
    Ben C, Aug 8, 2007
    #7
  8. On Aug 8, 4:20 pm, Ben C <> wrote:

    > 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.

    --
    David Dorward
    http://dorward.me.uk/
    http://blog.dorward.me.uk/
     
    David Dorward, Aug 8, 2007
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jordan
    Replies:
    2
    Views:
    2,577
    Jordan
    Feb 10, 2004
  2. call_me_anything
    Replies:
    4
    Views:
    503
    Pete Becker
    Sep 30, 2007
  3. Cyril.Liu
    Replies:
    0
    Views:
    479
    Cyril.Liu
    Dec 2, 2008
  4. JcFx
    Replies:
    0
    Views:
    319
  5. middletree

    how to copy from fields to other fields

    middletree, Nov 5, 2003, in forum: ASP General
    Replies:
    1
    Views:
    186
    middletree
    Nov 5, 2003
Loading...

Share This Page