Forum Discussion
Working with iframe (Web Object)
- 27 days ago
After numerous trial/error I realized there is no way of closing the current window. The only way is to open the content at the same level as the initial one but you still end up having the parent window open (since that main window is opened by workday itself).
So in summary when someone opens a module in Workday this happens:
Workday page opens --> user clicks to open module --> new pop-up opens with module --> user clicks inside the storyline module to navigate to new module --> new module opens in that same pop-up but also opens a new Workday page relating to that new module.
So it works but you'll get a bunch of Workday tabs for each module clicked since you can't close them.
Hi RonLinder-4c1a3 in the HTML page you have in the WebObject for navigation, just add this function to the <head> of the HTML page and wrap it in <script></script> tags:
function goToProject(newLocation) {
window.parent.location.href = newLocation;
}
You can then call this function and just pass the URL, from a button, or link. Here are some examples:
// from a link <a>
<a href="javascript:void(0);" onclick="goToProject('https://abc.com/widgets101/introduction/story.html');">Introduction</a>
// from a button <button>
<button onclick="goToProject('https://abc.com/widgets101/introduction/story.html');">Introduction</button>
After numerous trial/error I realized there is no way of closing the current window. The only way is to open the content at the same level as the initial one but you still end up having the parent window open (since that main window is opened by workday itself).
So in summary when someone opens a module in Workday this happens:
Workday page opens --> user clicks to open module --> new pop-up opens with module --> user clicks inside the storyline module to navigate to new module --> new module opens in that same pop-up but also opens a new Workday page relating to that new module.
So it works but you'll get a bunch of Workday tabs for each module clicked since you can't close them.