Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Accessing TDC data

Reply
Thread Tools

Accessing TDC data

 
 
imaband
Guest
Posts: n/a
 
      11-14-2004
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
 
Reply With Quote
 
 
 
 
Ivo
Guest
Posts: n/a
 
      11-15-2004
"imaband" wrote
>
> <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.nodeV alue;

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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft TDC (Tabular Data Control) Search function Omicron Javascript 9 03-26-2008 05:25 AM
[ANN] rcodetools 0.7.0 (TDC: "test-driven, 100% accurate completion", automagic assertions/specs, doc/code navigation...) Mauricio Fernandez Ruby 0 06-22-2007 10:32 AM
Need help in programmatically accessing the data returned by data access method... Siva ASP .Net 1 04-17-2006 06:48 PM
live hyperlinks and Tabular Data Control (tdc) that ships with IE4.0. bobdedogh@ukonline.co.uk Javascript 4 06-15-2005 06:30 PM
TDC-80 Wild Child Digital Photography 0 05-26-2005 02:09 AM



Advertisments