Created
July 8, 2018 14:29
-
-
Save akhmadkresna/a3766ebc8a6c6b988ba99764d611a6f6 to your computer and use it in GitHub Desktop.
odoo get file name from website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="col-md-7 col-sm-8"> | |
<input id="upload" type="file" class="form-control o_website_form_input" name="file" required=""/> | |
<input id="upload_name" type="text" class="form-control o_website_form_input" name="filename" required=""/> | |
</div> | |
<script> | |
$(function(){ | |
$('#upload').change(function(e){ | |
var fileName = e.target.files[0].name; | |
alert('The file "' + fileName + '" has been selected.'); | |
$('#upload_name').val(fileName) | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment