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 happens
  • pyramidApp.present.goToPage(2) → nothing happens
  • pyramidApp.navigateToSlide(2) → nothing happens
  • pyramidApp.present.navigate(2) → nothing happens
  • window.postMessage({type:'nextSlide'}, '*') → nothing happens
  • document.querySelectorAll('.tab-header-item')[1].click() → nothing happens
  • document.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-scroller with 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

Reply

null

Content aside

  • 12 hrs agoLast active
  • 7Views
  • 1 Following