Set focus to the File Upload Input field in Javascript

<html>
<body>
    <script language="JavaScript">
    function checkFile(){
         document.form1.uploadbox.focus();
         document.form1.textbox.value = "Verify that filename is correct";
    }
    </script>
    <form name="form1">
    Enter Filename:
    <input type="file" name="uploadbox">
    <input type="button" value="Okay" onClick="checkFile()">
    <br><br>
    Confirmation Message:
    <input type="text" name="textbox" size=35>
    </form>
</body>
</html>

Comments

Popular posts from this blog

Shutdown Computer With Funny Reason

Hidden Attribute in javascript

Draw animated loading spinner canvas in Javascript