0


I have a problem in Firefox to change img src,
but it works in IE and Chrome,
this is my code below:

var ss = xxx.toDataURL();
var img = '#xxxImg' + $('#ImgIndex').val();
$(img).attr({
    src: xxx.toDataURL()
});

firefox show 'ReferenceError: src is not defined',
I have no solution to fix it,
please help me

Update:
src have value:
data:image/png;base64, ***********
but img still don't show the new Image,
I found this
but don't worked for me,
or just preload it wrong side?

$(img).attr(
    "src", xxx.toDataURL()
);
$(img).preload();
Community
  • 1
  • 1
Louis
  • 123
  • 1
  • 3
  • 11

0 Answers0