Hello,
I have two link buttons to respectively select the prior or the next item from a select component. The use case is:
- The users select an initial value from the select component. (ie. Select 2 from [1,2,3])
- When they click the "Previous" Link, the prior item in the select component is selected. (1 is being selected)
- When they click the "Next" Link, the next item in the select component is selected. (Now 2 is being selected)
I originally created two javascript, so when the previousLink is clicked, it triggers the previousQuery, and when the nextLink is clicked, it triggers the nextQuery.
I would like to know if it is possible to put them together in one javascript by adding a logic saying if previousLink is clicked then ... and if nextLink is clicked then ...
Thank you in advance for the help.
Happy Retooling!