0

I've been able to use tags to show a pdf file to user this way:

<div>
   <object data="/Reports/PDF/#Trim(RptName)#_NewReport.pdf" type="application/pdf" width="860" height="700">
   </object>
</div>

Is it also possible to do this for any file other than a pdf file? I need to also show to my users their log file, UserName_Error.log. I tried the following and nothing showed up, the log is there. I googled for tips and could not find it.

<div>
   <object data="/Reports/UserError/#Trim(UserName)#_Error.log" type="text/html" width="860" height="700">
   </object>
</div>

If this is not possible at all?

user1557856
  • 163
  • 2
  • 12
  • this could be a good starting point -> https://stackoverflow.com/questions/6450921/show-a-txt-file-on-a-webpage-which-updates-every-second – DaFois Dec 15 '17 at 16:49
  • 2
    You can read text files using either `` or ``. Details are in the manual which is available on the internet. – Dan Bracuk Dec 15 '17 at 19:12

1 Answers1

1

Use iframe.

The HTML <iframe> element represents a nested browsing context, effectively embedding another HTML page into the current page.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe

tech4him
  • 970
  • 5
  • 20
  • difference between iframe, embed and object elements : https://stackoverflow.com/questions/16660559/difference-between-iframe-embed-and-object-elements/ – tech4him Dec 15 '17 at 16:38