on ‎2024 Jun 26 7:14 AM
Hello SAP Community, we are currently working on the integration of our SAC Stories in different application to give our colleagues a flexible view on the data. In one of our application we have the requirement to show multiple Stories and the user can scroll from one to another Story. The current solution is currently that we have an iFrame to show the Story. When the user click on next, then page is reloaded and for the new iFrame the next URL points to the next Story. (So we don't reuse the iFrame.)
However, this is a source of frustration for our colleagues, as the page always takes 15 to 20 seconds to load the story.
We are therefore currently looking for an alternative integration and came across this topic in the help section: "Enable Silent iFrame Navigation"
https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/a4406994704e4af5a8559a640b496468/9e147121f2254300b308c...
With this approach, we would reuse the iFrame. Unfortunately, our test implementation does not work. Do you have any idea why this might be?
We use a button with a JavaScript function to send the msg (postMessage) to the iFrame of the SAC. We see no error in the JavaScript console, but the iFrame don't change to the next Story URL.
function next(){
var oIframe = document.getElementById("iframe");
var requestId = (new Date()).getMilliseconds();
if(iIndex + 1 < aStories.length){
iIndex = iIndex + 1;
} else {
iIndex = 0;
}
var msg = {
type: "request",
service: "embed:silentNavigation",
request_id: requestId,
body: {
path: aStories[iIndex]
}
};
oIframe.contentWindow.postMessage(msg);
}Thanks & best regards Denis
Request clarification before answering.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.