Okay, how about something like:
reg = new RegExp('/'+imagename+'$/', 'gi');
new_src = $(this).attr("src").replace(reg, fileObj.name);
On Mar 18, 10:00 am, Chris K wrote:
> As I said that doesn't work.
>
> On Mar 18, 11:48 am, James wrote:
>
> > var new_src = $(this).attr("src").replace(imagen
As I said that doesn't work.
On Mar 18, 11:48 am, James wrote:
> var new_src = $(this).attr("src").replace(imagename, fileObj.name);
>
> will store the String value of that into new_src, so you just set your
> image source to it.
>
> $(this).attr("src", new_src);
>
> On Mar 18, 7:56 am, Chris K
var new_src = $(this).attr("src").replace(imagename, fileObj.name);
will store the String value of that into new_src, so you just set your
image source to it.
$(this).attr("src", new_src);
On Mar 18, 7:56 am, Chris K wrote:
> I have the image name in a variable and want to replace it but not
>
3 matches
Mail list logo