If you take out the attribute it works. Did you need it?

<SCRIPT language="JavaScript">
<!-- HIDE SCRIPT FROM OTHER BROWSERS

function validate(){
if(document.upload_documents.document_title.value==""){
alert("You must enter a Document Title")
upload_documents.document_title.focus()
return false
}

return true
}
// END OF SCRIPT -->
</SCRIPT>

<form action="frm_document_add.cfm" method="post"
enctype="multipart/form-data" onsubmit="validate()" name="upload_documents">

<input type="text" name="document_title" size="50">
<input type="submit">
</form>

----- Original Message -----
From: "Seamus Campbell" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, April 20, 2002 12:31 PM
Subject: upload form not working with JS validation


> Hi this is slightly off topic but I'm hoping someone may be able to help
>
> I have an upload form with 3 fields
> I want to make sure the document_title filed is filled in BEFORE the file
> is uploaded
> I'm trying the JS code below but cannot get it to work
>
> Is there any problems using JS validation with form
> enctype="multipart/form-data"  ??
>
> Any clues please
> Seamus
>
>
>
>
> <SCRIPT language="JavaScript">
> <!-- HIDE SCRIPT FROM OTHER BROWSERS
>
> function validate(upload_documents){
> if(upload_documents.document_title.value==""){
> alert("You must enter a Document Title")
> upload_documents.document_title.focus()
> return false
> }
>
> return true
> }
> // END OF SCRIPT -->
> </SCRIPT>
>
> <form action="frm_document_add.cfm" method="post"
> enctype="multipart/form-data" name="upload_documents">
>
> <input type="text" name="document_title" size="50">
>
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to