In comp.lang.javascript message <ZN6dnbNg08nKwXPYnZ2dnUVZ_oWdnZ2d@comcas
t.com>, Wed, 7 Mar 2007 00:31:30, McKirahan <Ne**@McKirahan.composted:
>"Eric" <er**********@gmail.comwrote in message
news:11**********************@8g2000cwh.googlegro ups.com...
>Hello,
I have code similar to:
if (beforeToday(document.forms[0].sStartDate.value))
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(document.form1.sStartDate.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.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.