On Mar 21, 5:10 pm, Jim Land <rrrrfffftttt(no)@(spam)hotmail.com>
wrote:
"jnag" <prajy...@gmail.comwrote in news:1174505780.987236.193340
@l77g2000hsb.googlegroups.com:
Hello,
I have date fields on a form which is generated by a Coldfusion custom
tag (another piece of code). I want to change something else on the
form when the user changes the date. But, how do I generate an
onChange() event on this field (since I only have the call to the
custom tag in this form)?
Thanks in advance for any suggestions.
Try this JS (note: execute this line *after* the form has loaded):
document.forms['TheFormName'].elements['TheDateFieldName'].onclick =
whatYouWantToDo;
Thank you very much for this suggestion. It works partially (in that,
before I was not able to even fire the event). But, it is implementing
the event function before the form comes up. I want it to happen when
the user changes the date. I have included this line after the
<form...tag just where the date field tag is defined. Is this
probably because the date field is part of the server side custom tag
which has already been executed? Thanks.