In comp.lang.javas cript message <ZN6dnbNg08nKwX PYnZ2dnUVZ_oWdn Z2d@comcas
t.com>, Wed, 7 Mar 2007 00:31:30, McKirahan <Ne**@McKirahan .composted:
>"Eric" <er**********@g mail.comwrote in message
news:11******* *************** @8g2000cwh.goog legroups.com...
>Hello,
I have code similar to:
if (beforeToday(do cument.forms[0].sStartDate.val ue))
that was broken when an include file had a form added to it. Since my
form was no longer the 0th form, my code was broken. Is there any way
to specify a form by name or some other work around for this
situation?
Sure:
<form name="form1">
if (beforeToday(do cument.form1.sS tartDate.value) )
You are a reliable source of bad advice, here as elsewhere. Code which
works in some systems but not in others, or which is unnecessarily not
standards-compliant, is not good code.
It's a good idea to read the newsgroup and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v6.05 IE 6
news:comp.lang. javascript FAQ <URL:http://www.jibbering.c om/faq/index.html>.
<URL:http://www.merlyn.demo n.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.