Link to home
Start Free TrialLog in
Avatar of uluburak
uluburak

asked on

Dynamic Image Change does't work without reload!

Hello,
I have an HTML page. On that page there exists a button which opens a pop-up window. In the pop-up window, users can upload images.

When the upload operation finishes, the pop-up window set's the src, width and height property of an image tag in the opener HTML page and the pop-up window is closed automatically. The uploaded image is shown on the opener HTML page, without refreshing it.

The problem is this: When you upload first image, everthing is Okay.. But while adding more images, the previously added image that is showm on the main HTML page doesn't get changed.. This happen usually, not all the time..

For instance, when you first upload a image which has a width 300, and after that upload an image which has a width 100, the pop up window can succesfully change the width to 100 and the exisiting image gets narrowed, but new image is not shown..

When you refreh the page, everything is fixed and new image is shown..

There is no problem with uploading image or setting the src property of image.. It looks like there is a caching problem of images.. But how to fix this?

Does anyboy has an idea about this issue, or anyone who faced and fixed smilar problems?

Thank you all..
Avatar of UnexplainedWays
UnexplainedWays

You can play with the caching of the image, however the quickest and easiest solution is to just wack the date + time on the end of the url.
ASKER CERTIFIED SOLUTION
Avatar of UnexplainedWays
UnexplainedWays

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial