hedgehog001
Junior Member
Posts: 2
Registered: 10/23/2007
Member Is Offline
|
| posted on 10/23/2007 at 06:33 PM |
|
|
Using Tigra Calendar in a repeated region
I'm trying to use the calendar tool in a repeated region on a form I'm creating.
The tool works correctly for the first item on the list but if I select the icon on any of the other fields, it simply updates the first field
again.
How do I get this tool to work with each individual record in the repeated region?
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 10/23/2007 at 06:55 PM |
|
|
Make sure each calendar instance is provided with the correct information about the input box it should be attached to. It will not work correctly if
you just copy the same code.
|
|
|
hedgehog001
Junior Member
Posts: 2
Registered: 10/23/2007
Member Is Offline
|
| posted on 10/23/2007 at 07:05 PM |
|
|
Yes, the calendar is working for the first item in the list correctly but it will not work for the others in the list.
The list is created and repeated using PHP so I'm not sure how to define each individual text box with an separate ID for the Javascript end to read.
It's defined in my code as:
var call = new calendar2(document.forms['form1'].elements['AppDate']);
However, because of the repeated region, there are several different fields with the "AppDate" element. How can I define these to be different so
that the Javascript can read them differently?
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 10/23/2007 at 07:12 PM |
|
|
you'll need unique names for your input boxes or use different referencing mechanism.
You can for example append the loop variable to the name of the input box thus making the names unique.
|
|
|