Hi all,
Setting the src attribute on an <img> element won't necessarily guaranteed
that the image will be updated and point to your new image file since it
doesn't force the <img> tag to be reinterpreted or executed. What you should
do instead is create two Image widgets (or use an ImageBundle and bundle the
two images in it), and swap them as needed when you want to change the image
(explicitly removing the old image widget and adding the new one).

Hope that helps,
-Sumit Chandel

2009/8/18 sschz <[email protected]>

>
> Hi,
>
> I also have the same problem though, in my case, the image is being
> updated when using firefox (ie and hosted mode do not seem to realize
> the image url has been modified). Has anyone managed to solve this
> problem? I'm using gwt1.6.4
>
> I've tried to update the image both, by using setUrl and DOM.setImgSrc
>
> Regards.
>
> On Jul 21, 3:18 pm, Дмитрий Николаев <[email protected]> wrote:
> > Hi!
> >
> > I'm in trouble - very often when Iupdateurlof the images, browser
> > notupdatethem (in hosted mode, firefox)
> >
> > img.setUrl("..."); // sometimes won't work
> >
> > Ok, I try to instantiate newImageevery time I needupdateurl. I Use
> > img = newImage("..."); on my SimplePanel.
> >
> > In hosted mode ot works, but in firefox - won't, when I press shift
> > +refresh when reloading page (with clearing the cache).
> >
> > Hacks like DOM.setElementAttribute(Image.getElement(), "src", path);
> > won't help.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to