I have a% of image upload% where the user before doing an update on the avatar image or profile cover, he visualizes (in the same form) his registered image or a system default.
It turns out that my form
has an "onchange" and my input type
is with "onclick" ie my submit ends up being input submit
and would like to hide it for while href
is not selected, it is hidden and when file
has a selected file this file
is displayed to proceed with the upload request.
Follow my form:
<form id="up_cover">
<input type="file" onchange="readURL(this);">
<a href="javascript:; onclick=document.getElementById(up_cover).submit();">
Atualizar
</a>
<input type="hidden" name="update_cover_user">
</form>