Accessing TDC data

I

imaband

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_data" datafld="Answer"
dataformatas="text">

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

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

document.getElementById("answer").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
 
I

Ivo

<div id="answer" datasrc="#qa_data" datafld="Answer"
dataformatas="text">

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

document.getElementById("answer").value;

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

document.getElementById("answer").firstChild.nodeValue;

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

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top