I want to read the contents of a text file, split it with a pipe character, then display parts of the array in a couple of paragraphs on the page.
What I've done:
1. Load the file contents into a div
This part works. The content of the text file is of the format Title|Reference|Author
I want to display the Title in one paragraph (<p class="stitle"></p>) and the Author in another (<p class="speaker"></p>.
I tried this:
var new_s = $("#stmp").text();
and tried writing this to the paragraph:
and also simply tried writing new_s with document.write(). Neither displays any content.
Of course, I'll need to use split() at some point, but it seems the problem I need to resolve lies elsewhere.