Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to display a jpg in a popup browser window

Posted on 2011-09-22
8
Medium Priority
?
146 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 84

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 84

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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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
 

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 84

Accepted Solution

by:
Dave Baldwin earned 2000 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 84

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
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…

661 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