-
dropdown notify() issue.
Hi guys! as always! thank you for all your help!!!
I have a user interface which includes a dropdown with 8 options and a checkbox button that I would like when unchecked to select option #2 from the dropdown, but when checked back again to go to the previous selected option. So, if user had option #6 selected prior to unchecking the button, and then the user decides to check it back again, I would like it to go back to option #6.
In the process of writing this script, I noticed that no matter if I do or do not insert the dropdownBar.notify() inside the checkbox button, it will still change my dropdown selection by just typing dropdownBar.selection = (the value)…
Im including the script that I came up with.. which as explained, it does not work cause Im not sure how else to store the old selection… Anyways, if you happen to know how can I fix my code or a way to retrieve the previews selection, I will truly appreciate it!
Thanks in advance!
var savedOptionValue = dropdownBar.selection;
var OptionValue = savedOptionValuecheckboxHeadlineProp.onClick = function(){ // CHECKBOX FOR HEADLINE/PROPERTY (ON or OFF)
if(checkboxHeadlineProp.value == true){dropdownBar.selection = savedOptionValue
//dropdownBar.notify(); //NO MATTER IF INCLUDED OR NOT IN THE CODE, IT STILL CHANGES MY DROPDOWN SELECTION.}else{
dropdownBar.selection = OptionValue
dropdownBar.selection = 2;
//dropdownBar.notify() //NO MATTER IF INCLUDED, IT STILL CHANGES MY DROPDOWN SELECTION.
dropdownBar.selection = OptionValue //Old stored value which I was planning to use after the notify() for when checkbox is ON.
}
};