I am attempting to utilize a javascript popup calendar to populate a text field with the user selected date. There are multiple text fields in the form, generated by php, for multiple rows of input. The names of the date fields are formatted date[0], date[1], etc.. to allow all of the rows of input to be processed by the php. However when the names are in this format the javascript does not work. If the name is static such as date, it works. The problem lies in having the name in the format date[x]. How do I escape/fix this string so each date will have the ability to be populated by a popup calendar?
The following is the link: <A HREF=”#” onClick=”cal.select(document.forms[‘pop’].date[x],’anchor<? echo $count; ?>’,’MM/dd/yyyy’); return false;” NAME=”anchor<? echo $count; ?>” ID=”anchor<? echo $count; ?>”>select</A>
where date[x] is date[0], date[1], etc each time link is generated. Thank you!
Ben