aspose file tools*
The moose likes Struts and the fly likes Image load on IE is getting problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Image load on IE is getting problem" Watch "Image load on IE is getting problem" New topic
Author

Image load on IE is getting problem

Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 261
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.


Thanks,
Kumar
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
What tag are you using to try to display the image?
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 261
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

Joined: Mar 19, 2008
Posts: 261
hey any luck on this?
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
I'm confused, where is the code (javascript I assume) that calls your pop-up?
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 261
hi tom,

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


This is javascript function
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
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

Joined: Mar 19, 2008
Posts: 261
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

Joined: Mar 19, 2008
Posts: 261
Hi Tom,

did you understand my code?
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
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

Joined: Mar 19, 2008
Posts: 261
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

Joined: Mar 19, 2008
Posts: 261
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image load on IE is getting problem