August 1999
Intermediate to advanced
1488 pages
72h 53m
English
fileupload.focus()
The focus() method is used to set focus to the FileUpload object.
Listing 7.242 shows how to set the focus on the FileUpload object. When the user clicks the OK button, the JavaScript function checkFile() is called to reset the focus to the upload box and display a message.
<html> <head> <title>Using the focus method to set focus to FileUpload box</title> </head> <body> <script language="JavaScript"> <!-- Hide function checkFile(){ // sets focus to the upload box document.form1.uploadbox.focus(); document.form1.textbox.value = "Verify that filename is correct"; } // End Hide ... |
Read now
Unlock full access