Solved

How to display a jpg in a popup browser window

Posted on 2011-09-22
8
141 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 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

749 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