I'm not sure why you'd need the JS.

Ade

-----Original Message-----
From: Taz [mailto:[EMAIL PROTECTED]]
Sent: 14 February 2003 15:37
To: [EMAIL PROTECTED]
Subject: Re: [ cf-dev ] Macs and formfields



> Thank you, I thought that would be the case. Does anyone know why this
> happens?

'Why' is beyond me, but how to avoid problems is easy.

If you've got a file upload field its best to put it at the end of the form
(or at least the last field before the buttons).

If the form is used for editing content, you might not always have a file
uploaded. You need to create a javascript function that disables the field
on submit if it's empty. This is especially important if you have multiple
file upload fields.

so your javascript for the onsubmit will be something like:

if(document.myform.myupload.value == '') {
    document.myform.myupload.disabled = 1;
}

Taz


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to