opencart
onchange file input change img src and change image color
You need to send this object only instead of this.value while calling onchange <input type=”file” id=”upload” onchange=”readURL(this)” /> because you are using input variable as this in your function, like at line var url = input.value;// reading value property of input element Working DEMO EDIT – Try using jQuery like below — remove onchange from … Read more