php - How to disable File uploader? -


i want like, when user upload file,after want make file uploader disable. in other word,user not allow upload file once file uploded.

i have tried

<script type="text/javascript"> document.getelementbyid(file1).disabled = true; </script>  <input type="file" name="submission_file" id="file1"> 

but not working. how can this?

you not placing single qoutes on id

document.getelementbyid('file1').disabled = true; 

detailed answer

<script> function diablefield() {     document.getelementbyid('file1').disabled = true; } window.onload=diablefield;  </script> 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -