i had a form where user put in the necessary informations and also upload file into the form.I need to check whether the file attached is correct name and type so that i can open the attachment to check its content.
how can i check it among the attachments in java??
can anyone advise? thks
Subject: File Attachment (URgent)
give ur file upload control a name called "MyUpload"put this code into the form onsubmit event
btw I do the checking in javascript.
var oFile=document.getElementsById(“MyUpload”)
if (oFile.value.indexOf(“.doc”)) //winword file
return true
else
return false
Subject: RE: File Attachment (URgent)
thks for the help…but how to give the file upload control a name??
also i got this error “Object doesnt support this object or method”
again appreciate your advise
Subject: RE: File Attachment (URgent)
in ur file upload control property,goto last tab (“” tab), key in the name “MyUpload” inside Id
======
sorry I made a mistake in the JS, it should be getElementById, not getElementsById 
var oFile=document.getElementById(“MyUpload”)
if (oFile.value.indexOf(“.doc”)) //winword file
return true
else
return false
put this code inside onsubmit event of ur form