[thelist] Different forms to the same script
Scott Dexter
sgd at ti3.com
Tue, 30 Nov 1999 10:55:08 -0600
>
> > Also, I'd question your use of multiple forms --from this
> code it doesn't
> > look like there's any benefit. Is there a reason you don't
> use one form?
>
> I've tried using one form but I got stuck.
> Having multiple fields in the same form with the same name
> can really screw up a Javascript.
well you're stuck with half of one and 6 of the other. With one form and
multiple fields named the same you have an array of fields(automatically
made, btw) -- fieldname[].value, with multiple forms named the same you have
an array of forms (again, automagically built by the browser)
--formname[].field.
You can also use "this" to pass in the specific item (form or field) you
want to check:
function splitTime(formfield)
formfield.value ...
onChange="splitTime(this);"
(look familiar?)
sgd
--
think safely