Re: [jQuery] Refresh an image with dynamic src URL?

2006-11-14 Thread Chris W. Parker
On Monday, November 13, 2006 9:08 PM Matt Grimm said: What would be an ideal way to refresh an image whose src attribute is a script that dynamically generates the image? Would it be best to store the value of the src attribute in a variable, remove the img element from the DOM, and append a

Re: [jQuery] Refresh an image with dynamic src URL?

2006-11-14 Thread Arrix
I've experienced problem in IE6 when trying to refresh an image by changing the src attribute. My code looked like this:$('._valCode', divVote).src('../images/validationCode.php?w=50h=17t=' + new Date().getTime()); IE6 would not display the image until I clicked Show Picture in the right click

[jQuery] Refresh an image with dynamic src URL?

2006-11-13 Thread Matt Grimm
What would be an ideal way to refresh an image whose src attribute is a script that dynamically generates the image? Would it be best to store the value of the src attribute in a variable, remove the img element from the DOM, and append a new image element with the same URL? In my quick tests, it

Re: [jQuery] Refresh an image with dynamic src URL?

2006-11-13 Thread Glen Lipka
Is this not working for you? $(img.whatever).attr(src,newurl.gif); Glen On 11/13/06, Matt Grimm [EMAIL PROTECTED] wrote: What would be an ideal way to refresh an image whose src attribute is ascript that dynamically generates the image? Would it be best to store the value of the src attribute in

Re: [jQuery] Refresh an image with dynamic src URL?

2006-11-13 Thread Blair Mitchelmore
If you want to defeat the cache you could try appending the current time as a query string: img.src = fileName + ? + (new Date()).getTime(); -blair Matt Grimm wrote: What would be an ideal way to refresh an image whose src attribute is a script that dynamically generates the image? Would it

Re: [jQuery] Refresh an image with dynamic src URL?

2006-11-13 Thread Aaron Heimlich
On 11/13/06, Blair Mitchelmore [EMAIL PROTECTED] wrote: If you want to defeat the cache you could try appending the current timeas a query string:img.src = "" + ? + (new Date()).getTime();-blairAnother solution would be to, in your image generating script, send HTTP headers that tell the browser

Re: [jQuery] Refresh an image with dynamic src URL?

2006-11-13 Thread Yehuda Katz
Something like that worked for me when I did a fairly complex app that used changing img's to simulate seeking through a video.-- YehudaOn 11/14/06, Blair Mitchelmore [EMAIL PROTECTED] wrote: If you want to defeat the cache you could try appending the current timeas a query string:img.src = "" +

Re: [jQuery] Refresh an image with dynamic src URL?

2006-11-13 Thread Matt Grimm
an image with dynamic src URL? Is this not working for you? $("img.whatever").attr("src","newurl.gif"); Glen On 11/13/06, Matt Grimm [EMAIL PROTECTED] wrote: What would be an ideal way to refresh an image whose src attribute is ascript that dynamically generat

Re: [jQuery] Refresh an image with dynamic src URL?

2006-11-13 Thread Matt Grimm
an image with dynamic src URL? If you want to defeat the cache you could try appending the current time as a query string: img.src = fileName + ? + (new Date()).getTime(); -blair Matt Grimm wrote: What would be an ideal way to refresh an image whose src attribute is a script that dynamically

Re: [jQuery] Refresh an image with dynamic src URL?

2006-11-13 Thread Matt Grimm
Discussion.Subject: Re: [jQuery] Refresh an image with dynamic src URL? On 11/13/06, Blair Mitchelmore [EMAIL PROTECTED] wrote: If you want to defeat the cache you could try appending the current timeas a query string:img.src = "" + "?" + (new Date()).getTime();-b