Accessing TDC data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • imaband

    Accessing TDC data

    Hello,

    I'm using a TDC to grab data from a CSV file. Here is the DSO
    declaration.

    <object id="qa_data"
    classid="clsid: 333C7BC4-460F-11D0-BC04-0080C7055A83">
    <param name="DataURL" value="QA_Data. csv" />
    <param name="UseHeader " value="True" />
    </object>

    Then I consume the data using the following HTML:

    <div id="answer" datasrc="#qa_da ta" datafld="Answer "
    dataformatas="t ext">

    Never fear, it displays the correct data just
    fine........... .......but...

    How do I programmaticall y access the VALUE of the above div field from
    javascript? I tried

    document.getEle mentById("answe r").value;

    which does not work. I then tried to access the value using the
    recordset collection but the only documentation on the web that I can
    find is specific to VBScript or anything but JavaScript.

    Thanks,

    imaband
  • Ivo

    #2
    Re: Accessing TDC data

    "imaband" wrote[color=blue]
    >
    > <div id="answer" datasrc="#qa_da ta" datafld="Answer "
    > dataformatas="t ext">
    >
    > How do I programmaticall y access the VALUE of the above div field from
    > javascript? I tried
    >
    > document.getEle mentById("answe r").value;
    >[/color]

    I don't know about datasrc's, but a div is a div and div's don't have
    values.
    Try:

    document.getEle mentById("answe r").firstChild. nodeValue;

    if you expect the first child to be a text node.
    HTH
    --
    Ivo


    Comment

    Working...