Target groups with Javascript

Have not been as active as before on the community, mostly due to a contract job. Well that ends on January, so i will be more active again… and open for new interesting jobs and projects offcourse 😉 Quality assured as you all know…
A question popped up on the forum about groups and how to target them with javascript. If you know the HTMLname thats not so tough, but how can you get the htmlname(s) of groups automatically , so you either can show a single group or all if wanted.

Well that shows in this sample. There are 2 invisible groups in this .awt…
Use the inputfield to show group 0 or group 1. Click the button and the appropriate group shows. You actually can add as many groups as you want to the awt. It keeps functioning correctly. If you wonder how the order…0-1 is setup… top group in the Lectora explorer is 0 and then it counts up. So if you change that order in the .awt… well just try 😉

Preview image

Tags: ,