var contentString =
'<div id="content">'+
'<p>some text which I have written directly into the Javascript</p>'+
'</div>';
Now that is fine when the text is only one line long. Suppose it's longer?
What I want to do is have Javascript give the variable contentString its text from a hosted text file in a similar manner to the way Javascript can insert more Javascript using a hosted .js file.
I illustrate what I need to do using some "dummy" Javascript:
var contentString =
<someInstruction src="//mytextfile.txt">
Thank you for that omnicity, but I'll probably just leave well alone because my experience of Ajax is limited, unless you can direct me to some examples.
Bookmarks