Here, I have one drop down with 3 value like 0, 1, 2 and 5 text boxes.
http://jsfiddle.net/ssthil/j4JZX/3/
when i change the drop down value, from credit card to purchase card or purchase card to credit card that time only i need to clear the entered data. not for from 0 to 1 or 0 to 2.
Added more:
I have 3 drop down value as 0, 1 and 3. And 5 more text boxes are there. By default the drop down value is 0, now i enter the data for that text boxes and i change the drop down value 0 to 1 or 2. This time shouldn’t happen no more changes on those textboxes value. If i select the drop down value from 1 to 2 or 2 to 1, this time data should be clear.
Can anyone help on this required?
Save the previously selected value, compare it with the currently selected value, if there is a transition
2 -> 1or1 -> 2, clean up your textboxes:Fiddle.