Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HTML
<form id="uploadForm" enctype="multipart/form-data" method="post" action="http://example.com"><dl class="zend_form">
<dt id="image-label"><label for="image" class="required">Upload an image:</label></dt>
<dd>
<input type="hidden" name="MAX_FILE_SIZE" value="134217728" id="MAX_FILE_SIZE">
<input type="file" name="imageFile" id="image"></dd>
<dt id="submit-label"> </dt><dd id="submit-element">
<input type="submit" name="submit" id="submit" value="Завантажити"></dd></dl></form>


and js
JavaScript
document.getElementById("imageFile").onchange = function() {
    document.getElementById("uploadForm").submit();
}


this logic don't work, how can I fix that?
Posted

1 solution

Just remove
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900