Image display in uploaded documents

anonymous wrote on Sunday, January 11, 2009:

I have uploaded few scanned images in jpg format.  I thought the images will be displayed with we click on the image name.  But the browser is prompting to open/save the image.

What changes I have to make to display the image in the same browser?

Thanks for your help.

anonymous wrote on Sunday, January 11, 2009:

I installed the OpenEMR on Windows server.

cfapress wrote on Monday, January 12, 2009:

What version of OpenEMR are you using? The latest is v2.9.1.

I tested this functionality by uploading a JPG image to the Documents of a test patient. When I then clicked on the image, in the left-hand folder tree, the main body of the page changed to show Date, Note, and other info. The image itself appeared at the bottom of the page. There is also a link at the top to Download the document.

Are you following similar steps but not seeing the Date/Note info above a displayed image?

Jason

anonymous wrote on Monday, January 12, 2009:

Hello Jason,

Yes, I am following the same process.  But, the image is not displaying on the right frame.  Instead it is prompting to save/open the image file.

tadisetti

gutiersa wrote on Monday, January 12, 2009:

This is a web browser issue, not openemr.
Are you using firefox or Internet explorer?
Openemr is intended to be used with firefox!

anonymous wrote on Monday, January 12, 2009:

I am using Firefox.  Do I need to change any setting in Firefox?

gutiersa wrote on Monday, January 12, 2009:

yes
go to tools > options > content…
    check load images automatically

then go to applications tab and set up the programs needed to open specific files, ie adobe reader for pdf, windows picture viewere (or whatever) for tiff, etc, etc

then click ok and try again

anonymous wrote on Monday, January 12, 2009:

Thanks for tip.  Now, the image is opening in a separate window/tab.

But, I thought the image will display in the same window, right frame, below "Add Note" button…

cfapress wrote on Tuesday, January 13, 2009:

All of my users are using OpenEMR v2.8.4 with Internet Explorer 7 without any troubles. When I do development for the app I make sure it works in both IE and Firefox since my contributions go back to the broad user base of OpenEMR.

In this case it looks like the code for the embedded JPG file isn’t working well in Firefox. I’m able to reproduce the original error of this message thread in a standard installation of Firefox v3.0.5.

After looking at the code I believe the trouble is with the iframe tag in the file openemr/templates/documents/general_view.html
This should be added to the list of bug fixes. In my development experience haven’t used iframe tags because it’s not really an accepted standard, even though all browsers make it work in some fashion:
http://www.w3schools.com/TAGS/tag_iframe.asp

A possible solution to this particular bug would be using DIV tags instead.

In any case, at the moment this feature is partially broken. Sorry.
Jason