• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Image load on IE is getting problem

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in my application when the user clicks on the thumbnail image (image is loading and displaying successfully), we needs to show him a popup window with bigger image(same as thumbnail). while working with Mozilla firefox, its displaying successfully, but while working with IE, I get an error with a popup window saying

Internet Explorer Can not download ImageAction.do/imageId=245 from loachost

Internet Explorer wen not able to open internet site, The requested site is either unavailable or cannot be found. Please try again.



even I tried several times I see the message.

see my code which is writing the image through ServletOutputStream.
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What tag are you using to try to display the image?
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but it doesn't matter with the tag, because with tag I can get the image. But while popup, I can't get the image. see the following tag that Im using to display successfully

 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey any luck on this?
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm confused, where is the code (javascript I assume) that calls your pop-up?
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi tom,

here is the code that Im using to popup the window including image.


This is javascript function
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the html source generated for the javascript function? I took a look at the documentation and I don't think thats the way you are supposed to put the parameters into your url with the html rewrite tag. I think you need to use the name or paramName/paramID attributes to the values into your URL. (or just append the ? and the parameters with javascript).

I'm guessing that firefox is forgiving enough to correct the URL but IE isn't.
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tom,

I have tried with same as you told with paramName/paramId.. see the following line that I have used in other page and the same javascript fuction I used, still Im getting the same problem with IE

As we have restrictions on events I put spaces between on and click (on Click())


As you asked about the View Source (Html source), here you find the following code, I removed unnecessary code and pasted what we need.
This page generated on IE


I compared source generated by IE and Mozil, but it seems both are same
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tom,

did you understand my code?
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm... the url you are generating your javascript looks pretty good to me. I don't see a problem. Are you still gettting the same error message?
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes still I'm facing the problem, I tested in different boxes also.

I was wondering that the image is displaying on the page in the same IE, when we click on the thumbnail image for popup then the problem is showing.
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Tom,

Got it.. finally we broke this investigation.

Just very simple change.

in my ImageAction class I was trying to writing the images in


but while uploading the image we used JPEG type image.
Hence, we are struggling with loading the image on IE. Mozilla firefox have some default setups (it doesn't care about the image type) that no matter what image we are trying to displaying, it is working on Firefox.

Finally in my code I changed to


Then I see the image on IE too.

I have a question, if the user uploaded the image which is the type png, then how can we display them.
Can we use multiple set contents in our action?
 
reply
    Bookmark Topic Watch Topic
  • New Topic