Home how to post image data through javascript

# how to post image data through javascript

user2392
1#
user2392 Published in April 24, 2018, 8:36 am
 I have a html form which sends POST data to my PHP script It also uses AJAX to provide a preview as they complete the form However the form uses onsubmit="" The issue i have is one of the html inputs is an image. the form is as below to give you an idea: 

 I am using var logo =document.getElementById("logo").value; for the image but when i am sending the logo value through to PHP it breaks the image as it isn't the correct post value required to be sent through to the PHP script as though you are submitting the form. Does anyone know how to get the same post value for the logo html field simply by using onchange and javascript?
 You need to login account before you can post.
Processed in 0.364886 second(s) , Gzip On .