I'm having trouble with this code
output.html('<img width="200" src="uploads/'+response.responseText+'" height="300" >');
It outputs this:
<img width="200" height="300" 1269050260.png""="" src="uploads/">
It should be:
<img width="200" height="300" src="uploads/1269050260.png">
I have tried many ways, for example:
output.html('<img width="200" src="uploads/'+response.responseText+'" height="300" >');
output.html('<img width="200" src="uploads/"'+response.responseText+'" height="300" >');
.....
But when I try this:
output.html("<img width='200' src='uploads/"+response.responseText+" height='300' >");
it gives
<img width="200" 300'="" src="uploads/"1074374482.png" height=">
which also wrong.
EDIT
When I tried this suggested below:
output.html("<img width='200' src='uploads/"+response.responseText+"' height='300' >");
I got this which is also wrong.
<img width="200" height="300" src="uploads/"977165688.png"">
When I try:
output.html("<img width='200' src='uploads/977165688.png' height='300' >"); // this works
src='uploads/"+response.responseText+"'.You forgot to close the src.var src = 'uploads/'+response.responseTextand then in.html()use"src="+src