I am looking for a way to include text on a page similar to SSI but I want to do it dynamically and I don't want to use iframes.
I need a way to load the text from the source url and then write it out to the current document when required
The easy part is writing it to the document, the hard part is accessing it in the first place. I tried iframes as an intermediary but found I had cross domain security problems. I could only load the text if it came from my own domain
So i was thinking if I create a script element eg
<script id="theirtext" src="someotherdomain.com/texttoinclude.txt">
// unwanted stuff
I could then read the text that was brought in and write it to the document when required
unfortunately I cannot find a way to access the actual text
I can only access the unwanted stuff with id.innerHTML or id.text
Does anyone know how I can access the file that was read in by the src="" statement?
perhaps there is another way? another element perhaps or maybe XML (I know next to nothing about xml)