ok, I understand, thanks.

I have seen over there that a possible solution can be just to add a time
stamp to the image:
$("#somethin").attr("src", "user1.jpg?x=" + new Date()); 

but it's not useful in my case, as my src points to a web service that
creates an images with the parameters you send; it's something like...

http://edit.csic.es/geoserver/wms/GetLegendGraphic?VERSION=1.0.0&FORMAT=image/png&WIDTH=25&HEIGHT=20&LAYER=topp:test_csvimportgispoints2&sld=http://edit.csic.es/fitxers/sld/initial/points/NO_BORRAR.sld

where sld is the XML file I update (but keeping the same name). So, this URL
cannot accept extra parameters.
I wanna avoid creating new XMLs each one with different names.

Some other idea?
Pere


Genus Project wrote:
> 
> 
> maybe it is caching the image :)
> 
> 
> On Jan 22, 1:27 pm, pere roca <pero...@gmail.com> wrote:
>> hi all,
>>
>> I'm having problems updating images dynamically. The thing is that the
>> src
>> attribute is allways the same (that's not an error but I need it this
>> way)
>> but the file the src points to is dynamically created via php (an xml
>> that
>> is used to create the new image).
>> The new image is not updated (well, sometimes work, sometimes not, that's
>> the worse);
>> if I take from the HTML, the src of the image and open in a new window,
>> the
>> correct image appears.
>>
>> That is:
>> $.get('function.php', function()
>> {
>> //function.php has created a new xml file
>> $("#image").show();
>> //i have tried a setTimeout of 2 sec, suspecting that the new XML is not
>> completely created (it should be correctly created, as we are on tha
>> callback) without success;
>>
>> })
>>
>> any idea?
>> thanks!
>>
>> Pere
>> --
>> View this message in
>> context:http://www.nabble.com/not-updating-images-after-ajax-request-tp216006...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/not-updating-images-after-ajax-request-tp21600610s27240p21603076.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to