I created a listbox that has a number of elements in it and then I created "Up" and "Down" arrows to allow the user to move the elements within the listbox to specify the order they want. The problem I have is when I save the document the state of the list box is not preserved. Below is the code I used to save allow the user to move the elements up or down. Please let me know if it is possible to save the state or if I have to find another solution to this requirement.
try
{
if(ListBox1.selectedIndex>0)
{
var selectedItem = ListBox1.items.nodes.item(ListBox1.selectedIndex)
ListBox1.items.nodes.insert(selectedItem,ListBox1.items.nodes.item(ListBox1.selectedIndex-1))
}
}catch(e)
{
app.alert(e+'');
}
Solved! Go to Solution.
Views
Replies
Total Likes
Usually by checking the setting to Automatically for the option "Preserve Scripting changes to form when Saved" in the Form Properties and Default Tab.
Thanks
Srini
Views
Replies
Total Likes
Usually by checking the setting to Automatically for the option "Preserve Scripting changes to form when Saved" in the Form Properties and Default Tab.
Thanks
Srini
Views
Replies
Total Likes
Thanks for the help. I didn't even see those options till now.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies