Solved

How to display a jpg in a popup browser window

Posted on 2011-09-22
8
137 Views
Last Modified: 2012-05-12
Hej,

I have a jpg the is lying on my IIS server and i just want to open a new window and display it with some javascript.

I have the open.window coded ok.. but do i have to do something else (such as the content type) because all i get is a small red cross...
0
Comment
Question by:soozh
  • 4
  • 3
8 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36582824
The new window needs to be web page of it's own.  I guess you could 'pop-up' just the image.  Maybe the path is wrong?  Show me the 'open.window' code.
0
 

Author Comment

by:soozh
ID: 36582957
I dont think there is anything wrong with the open window code.  When i enable directory browsing on my web server and browse/click on the image i still get the small red cross icon.  
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36583168
Ok, the post the image if you can.  JPGs come in more than one 'flavor'.  If you can open it in an image viewer or editor, try saving it under a slightly different name and see if you can view that in IE.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36584099
a red cross? the path of your jpeg is not the right

test page : http://jsfiddle.net/LtdcE/
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:soozh
ID: 36585282
I can view the image in the standard Windows Image/Fax viewer... but not in IE.
NPAT.DEMO.Katarakt-84.2903.4.205.jpg
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 36585340
The problem is that it is in CMYK mode, not RGB, and IE, at least up to IE8, does not display JPEGs in CMYK encoding.  If you open it in an image program and resave it as an RGB JPG, you'll be able to view it.
0
 

Author Comment

by:soozh
ID: 36585389
Thanks Dave.  How did you discover the coding?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36585436
In Irfanview http://www.irfanview.com/ , you can press 'I' for information and it tells you that it's a JPEG and CMYK.  Photoshop and other image programs will tell that also.  CMYK color encoding is used for printing while RGB is used for monitors.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now