G
gimme_this_gimme_that
In the snippet of code below the url http://someurl.com/data.txt
points to a csv file having a txt suffix.
I want to load the csv file and parse it in JavaScript.
In this example t.innerHTML is defined but has no content.
What can be done to get the content (the content of the txt file)?
Why isn't t.firstChild.nodeValue defined? Can the content be fetched
from the DOM?
Thanks.
<iframe id="data" src="http://someurl.com/data.txt"
style="visibility:hidden"></iframe>
<script language="JavaScript">
var t = document.getElementById('data');
alert(t.innerHTML);
alert(t.firstChild.nodeValue);
</script>
points to a csv file having a txt suffix.
I want to load the csv file and parse it in JavaScript.
In this example t.innerHTML is defined but has no content.
What can be done to get the content (the content of the txt file)?
Why isn't t.firstChild.nodeValue defined? Can the content be fetched
from the DOM?
Thanks.
<iframe id="data" src="http://someurl.com/data.txt"
style="visibility:hidden"></iframe>
<script language="JavaScript">
var t = document.getElementById('data');
alert(t.innerHTML);
alert(t.firstChild.nodeValue);
</script>