how to save previous selected value of dropdown in local variables?

Hi ,

    I am having a drop down with 4 choice values A,B,C,D. Based upon the value selected for Eg; D, a  section will appear below.

My requirement is

  1. when the drop down value selected is D, then below section should be refreshed i.e. set the section fields to null
  2. if the drop down value selected is either D to A or A to D or B to D or C to D , then below section should be refreshed i.e. set the section fields to null.
  3. if the drop down value selected is either B to A or A to C or B to C, then below section should not be refreshed.

so for this requirement i want to save the previous selected value of dropdown to compare with the latest selected value in order to do the refresh.

please provide your suggestions or any other idea to do this requirement.

Thanks in advance

Pradeep.B

  Discussion posts and replies are publicly visible