Hi there
I want to export my hype file in separate HTML files and I want t to use function to call slide from another slide,
the platform i will upload my files over it asked to use this funciton
function clipActionGotoSlide(pageIndex) { // implementation }
else he asked to put this one on every page
function onSlideIndexChange(pageIndex){ var isiPad = navigator.userAgent.match(/iPad/i) != null; if (isiPad) { window.location = "onSlideIndexChange:" + pageIndex; } else { console.log("onSlideIndexChange:" + pageIndex); } }
If you want to call this JavaScript function when you ‘exit’ a Hype scene, you could create a new JavaScript function ‘On Scene Unload’:
And then insert it within the resulting JavaScript area. This Hype document (which runs this function) would need to be embedded as a normal div, not within an iframe.
You would likely just insert:
function clipActionGotoSlide(pageIndex) { // implementation }
// else he asked to put this one on every page
function onSlideIndexChange(pageIndex) {
var isiPad = navigator.userAgent.match(/iPad/i) != null;
if (isiPad) {
window.location = "onSlideIndexChange:" + pageIndex;
} else {
console.log("onSlideIndexChange:" + pageIndex);
}
}
Can you explain a bit more about what you’re working with?
it is SIS server information system it is a platform like Veeva, and sorry I didn’t get the meaning of This Hype document (which runs this function) would need to be embedded as a normal div, not within an iframe.
Your Veeva-like platform likely allows embedding iframes, which is one way to embed your Hype document. If you embed your Hype document's HTML page using that method, the function function clipActionGotoSlide(pageIndex) will be executed within the Hype frame and won't be heard by the parent frame where the function actually is listening. So when you embed your Hype document, embed it by directly referencing the generated JavaScript file. That embed code looks like this:
You mean to write this code on every HTML page I exported from my hype file, and if that where to add my function, I am sorry but it is still very un-understand
can you please give me a hype file has 2 slides using this function, I appreciated your effort