I'm working on a form where there are three drop-down lists. When the user
picks a value from the first drop-down list, the SQL for the second
drop-down is changed to reduce the selection according to that first value.
That all works fine.
What I need to tidy up is the scenario where the user has picked a value in
the second drop-down list, then goes back to the FIRST drop-down list, picks
a different value which results in the second value being invalid.
What do I need to do to is reset the second value to blank ... with the
tricky bit being that this is in a repeating table, so I need to pick the
second value that is in the same row as the first value.
If I've got a sub that triggers under "OnAfterChange" for the change to the
first value, is there an "easy" way to derive the path to the second value
so that I can blank it?
Thanks.
--Philip
S.Y.M. Wong-A-Ton - 02 Mar 2006 07:59 GMT
The eventObj.Source object returns a reference to the DOM where the data
validation event is occurring. So you can use this to navigate upwards to
find the parent node (eventObj.Source.parentNode) of the first field where
the change is taking place and once you have the parent, you can navigate
downwards (using a selectSingleNode on the parent) to find the second field
of which you want to set the value to blank. The second field will be a child
of the parent of the first field, so a sibling of the first field.
---
S.Y.M. Wong-A-Ton
> I'm working on a form where there are three drop-down lists. When the user
> picks a value from the first drop-down list, the SQL for the second
[quoted text clipped - 17 lines]
>
> --Philip
Philip Colmer - 02 Mar 2006 12:13 GMT
Thank you - that is just what I needed clarified.
--Philip
> The eventObj.Source object returns a reference to the DOM where the data
> validation event is occurring. So you can use this to navigate upwards to
[quoted text clipped - 35 lines]
>>
>> --Philip
suresh Reddy - 02 Mar 2006 08:07 GMT
Hi Philip Colmer,
We can do this with Repeating Cascading List.
Check out this link
http://www.infopathdev.com/howto/tutorials/default.aspx?i=9f6fda3a14c14ac4924cf0
a382928432
Hope this will help You.

Signature
suresh Reddy