Image refresh after upload on same view?

hi everybody

i have a problem with refreshing an image after uploading it on the same
view.
i have redirect_to ‘my view’ in my upload method in the same controller
after handling image upload.
the image should be refreshed but the view is still showing old image.
when i push refresh button in browser the image gets refreshed.

any suggestions?

ps: i tried in firefox and ie also.

thank you

Add this code in the my view…

sine wrote:

hi everybody

i have a problem with refreshing an image after uploading it on the same
view.
i have redirect_to ‘my view’ in my upload method in the same controller
after handling image upload.
the image should be refreshed but the view is still showing old image.
when i push refresh button in browser the image gets refreshed.

any suggestions?

ps: i tried in firefox and ie also.

thank you

Naga harish Kanegolla wrote:
i tried but still dont work, and my browser shows me javascript error =
window.opener is null not an object?

Add this code in the my view…

sine wrote:

hi everybody

i have a problem with refreshing an image after uploading it on the same
view.
i have redirect_to ‘my view’ in my upload method in the same controller
after handling image upload.
the image should be refreshed but the view is still showing old image.
when i push refresh button in browser the image gets refreshed.

any suggestions?

ps: i tried in firefox and ie also.

thank you

Try this,
add this code in the method “save”.
def save
if @picture.save
redirect_to :action => ‘saved_picture’
return
end
end
and in saved_picture.rhtml u put this,

I think it should work…

Harish