0
Execute JavaScript – Navigate to Specific Slide in Present
Hi Team,
I'm trying to navigate to a specific slide in a Present Pro dashboard using Execute JavaScript action (not Jump To Slide). I wanted to share everything I've tried so far in case anyone has a solution.
What I want:
- When a user clicks a button, if their role is Admin → go to slide 2
- If not Admin → show an access restricted popup
What works:
Contains(UserRoles(), "Admin")→ role check works perfectly- The popup for non-admins works fine
"alert('test')"→ works"document.dispatchEvent(new KeyboardEvent('keydown', {key:'ArrowRight', keyCode:39, bubbles:true}));"→ goes to next slide (one slide forward only)
What doesn't work:
pyramidApp.present.goToSlide(2)→ nothing happens (this was working till Sunday Night)pyramidApp.present.nextSlide()→ nothing happenspyramidApp.present.goToPage(2)→ nothing happenspyramidApp.navigateToSlide(2)→ nothing happenspyramidApp.present.navigate(2)→ nothing happenswindow.postMessage({type:'nextSlide'}, '*')→ nothing happensdocument.querySelectorAll('.tab-header-item')[1].click()→ nothing happensdocument.querySelectorAll('.tab-header-hotbox')[1].click()→ nothing happens- Dispatching ArrowRight twice with setTimeout → only goes one slide forward
DOM findings:
- No
<button>elements found in Pyramid's DOM - Found
.horizontal-arrows-scrollerwith child classes:tab-header-hotbox,tab-header-item,tab-text,selected - Clicking these elements programmatically does nothing
Question:
Is there any JavaScript API or DOM method available inside Pyramid's Execute JavaScript action to navigate to a specific slide by number?
The goToSlide() method in the docs only works for the Embed API (EmbeddedResult), not inside internal JS actions.
Any help or workaround would be greatly appreciated!
Thanks