I need help on scripting to show and hide mainpages and pages on a subform depending on the value of the Dropbox Item,
DropboxItem has 3 values in the list Admin, Sales, Accounts,
there are 3 pages for each profile ie. pageName1.subform1 for Admin; pageName2.subform2 for Sales and pageName3.subform3 for Accounts;
if you select the value of Dropbox as Admin, then hide the pages for Sales and Accounts; and so on...ie. for Sales (admin and accounts are hidden) and for Accounts (Admin and Sales are hidden); since i have used the subform for each profile i can hide the Page for each profile but the issue is i get 1 blank page everytime i select 2 and 3 profile; if I select the 1st profile "Admin" the total number of pages just show up as required, the moment i select profile 2 i.e Sales or 3 Accounts, it shows up 1 blank page just before the Sales or Accounts profile. I need help with scrip to remove this extra page that is showing up each time when the value of dropbox items changes to 2nd or 3rd profile.
i have done little scripting in FormCalc any help with scripting in JavaScript or FormCalc would be of great help.
if(xfa.event.newText =="Admin") then
pageName1.subform1.presence = "visible"
else
pageName1.subFormname1.presence = "hidden"
endif
Regards,
HK