This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hello all: I am uploading a file to my servlet. Before doing so, on the client side I use Javascript to check if the file is csv or not. The checking is ok, but then my servlet says Enctype error. Notice that if I remove the Javacript checking, the file is uploading fine. So what is wrong with my approach? how to fix it? Following is my code, thanks. <script language = "javascript"> function fileFormSubmit() { var error1 = "please select csv file"; var error2 = "please select GIF file"; window.event.returnValue = false; var string = uploadForm.fileName.value.substr((uploadForm.fileName.value.lastIndexOf(".")+1));