-1

We're developing SCORM content for our client to put on their SuccessFactors LMS, and access through the SuccessFactors app on ipads.

Some of the course pages include links to pages on the internet and the clients intranet, but we're finding that these links will replace the course in the app's web view, and we aren't able to return to the course.

Has anyone found a way around this, so we can open the links in a new window and keep the learner in the course?

vwegert
  • 18,371
  • 3
  • 37
  • 55
Stuart Kemp
  • 150
  • 1
  • 11

1 Answers1

1

The Successfactors iOS app should work similarly to other iOS apps.The following code forces the iOS app to open a URL in the Safari browser. I believe it may also open in the default browser. Please try this code:

<div id="launchInBrowser" data-href="https://stackoverflow.com/posts/37790430">Stack Overflow</div>

and in the page's javascript:

document.getElementById("launchInBrowser").addEventListener("click", function(evt) {
var a = document.createElement('a');
a.setAttribute("href", this.getAttribute("data-href"));
a.setAttribute("target", "_blank");

var dispatch = document.createEvent("HTMLEvents");
dispatch.initEvent("click", true, true);
a.dispatchEvent(dispatch);}, false);

check here for more information:
Force link to open in mobile safari from a web app with javascript

Community
  • 1
  • 1
joel
  • 157
  • 1
  • 8
  • Thanks Joel, unfortunately the Successfactors app is a native iOS app, using a webview to load the SCORM course. In a real browser, the links get opened in new tabs, but the webview just replaces it's content with the new URL – Stuart Kemp Jun 13 '16 at 13:17
  • @StuartKemp - I found some information for how this will all work in iOS webapps like Successfactors. This forces the iOS app to open in a browser like Safari. – joel Jun 14 '16 at 20:18
  • Thanks Joel, I'll check this out next time I'm in the office, and try to get some time to give it a try. – Stuart Kemp Jun 15 '16 at 10:11
  • @StuartKemp - did you check out the solution I posted ? This solution should work properly. – joel Nov 22 '16 at 19:00