[thelist] form validation in javascript

Tom Dell'Aringa pixelmech at yahoo.com
Fri Mar 7 13:03:01 CST 2003

--- Robert Vreeland <vreeland at studioframework.com> wrote:
> --
> [ Picked text/plain from multipart/alternative ]
> Hello theList,
> I am currently working on a generic javascript form validation
> object. Due to the generic nature of the object I have two
> questions. First, when using Css to either set a div section / or
> element to visibility="visible" or display="none" within a form, do
> the 'hidden' elements get submitted?

I believe any element gets submitted unless it is set to disabled,
IIRC (if I am wrong someone correct me, going from memory). Note the
'hidden' form element doesn't show up but submits its name/value

> Second, when providing a INPUT
> TYPE='file' field is there any way to check if the client actually
> included a file for upload, and or to examine the file extension?
> Robert

You could check the field for a value, which would at least tell you
something is there other than blank. I think the rest depends on your
server side/cgi processing...



var me = tom.pixelmech.webDeveloper();

[Making A Commercial Case for Adopting Web Standards]

Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more

More information about the thelist mailing list