The following works fine if I need to serve the files which are of text types like log files, text files, etc...
But I'm unable to serve word specific files or any pdf/image files.
function ShowFile(strPath){
if (objHttpFileDataRequest){
objHttpFileDataRequest.abort();
}
objHttpFileDataRequest = $.get(
"includes/main.cfm",
{
path: encodeURI(strPath)
},
function(strFileData){
$("#readerArea pre#filecontent").text(strFileData);
}
);
}
var objHttpFileDataRequest = null;
I do have relevant code for handling pdf, images, and doctype files on my server, I only know that this jQuery should do something, I think that there is something missing.