This script: http://www.fengcool.com/2009/06/ajax-form-upload-local-image-file-without-refresh/ Only allows .gifs to be uploaded because of this in the ajax: if(response.indexOf(’.gif’)!=-1){ //upload successfully How to make it accept multipe (jpg, jpeg, gif & png), already did it on save.php but need to know how to do it on ajax side. Rep given! Thanks!
Have you tried to change the line if(response.indexOf('.gif')!=-1){ //upload successfully Code (JavaScript): to if(response.indexOf('.gif')!=-1 || response.indexOf('.jpg')!=-1 || response.indexOf('.jpeg')!=-1 || response.indexOf('.png')!=-1){ //upload successfully Code (JavaScript):