change the page included in javascript

  • 1
  • Question
  • Updated 5 years ago
  • Answered
Another option for me would be to use an include page control, load it with a blank page to start and when the user clicks on a program run a snippet that loaded a detail page into the included page control and set the program id in its url.

Can you load a page into an included page control using javascript ?
I don't see it in the api.
Photo of ktyler


  • 9,274 Points 5k badge 2x thumb

Posted 5 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 52,236 Points 50k badge 2x thumb
It's not in the documentation, you're right, but here's how to do it:

First, make sure your Page Include component has a Unique Id set, so that we can reference it via JavaScript:

var row = skuid.model.getModel('MyModel').getFirstRow();
var pageInclude = skuid.$('#MyPageInclude').data('object');
pageInclude.pagename = 'AccountDetailInclude';
pageInclude.querystring = '?id=' + row.Id;
   console.log('done loading');