@aelliott I did it but no luck yet.I have added the function after the code.Here is my js code.
require(['jquery','underscore','splunkjs/mvc','splunkjs/mvc/simplexml/ready!'], function($, _, mvc, SimpleSplunkView){
var content ;
function loadXMLDoc();
{
var textfile;
if (window.XMLHttpRequest);
{
textfile = new XMLHttpRequest();
}
textfile.onreadystatechange = function ();
{
if (textfile.readyState == 4 && textfile.status == 200) {
content = textfile.responseText;
}
} textfile.open("GET", "D:\vikas\vikas.txt", true);
textfile.send();
}
});
loadXMLDoc();
... View more