Hide and unhide a page / template js
Good afternoon,
I currently use Adobe Acrobat Pro, and in one of the drop down fields under format, custom keystroke, I am using the following code:
this.getTemplate("Temp 1").hidden = true;
if (event.willCommit)
{
switch(event.value)
{
case "2":
this.getTemplate("Temp 1").hidden = false;
break;
Temp 1 is basically a page out of 30 pages that we have converted to a template (under organize pages, selected the page and select page templates and gave it the name).
when the code above is run, temp 1 is appearing as the last page. I tried a lot of approaches to try to make it appear as page #4 and nothing seems to be working. I tried different AI to get the right code but I am pretty sure I am missing several steps.
What is the best approach to make this page appear under page 4 when option 2 is selected from the drop down, while making sure its hidden again when I go back to option 1.
thank you.
