I've been looking around at various solutions, and the 'easiest' I've found so far appears to be on this comment on a similar question.
I have very little knowledge of javascript or how to implement it, so I'm stuck as to why this might not be working.
So far I have:
<!DOCTYPE html>
<html>
<title>Goal, Strategy, Tactic</title>
<script type="text/javascript">
function read(textFile){
var xhr=new XMLHttpRequest;
xhr.open('GET',textFile);
xhr.onload=show;
xhr.send()
}
function show(){
var pre=document.createElement('pre');
pre.textContent=this.response;
document.body.appendChild(pre)
}
</script>
and in the body:
<script type="text/javascript">
<!--
read('Android_String_Update.txt');
show();
//-->
</script>
Android_String_Update.txt being a text file with content. I'm also testing this out on safari 8.0 which supports xhr2
Text file content is:
Example of text in file is
#### Inputs
No inputs required
#### Tools
* Jenkins
* Gitlab
#### Steps
1. Navigate to the jenkins
1. Click on "Build Now"
Any ideas what I'm doing wrong?