Question:
[Hi Iam using iframes HTML. How can I command that when I click on the Next-button, I jump to the beginning of the next page?]
Product:
[HTML iframes]
Question:
[Hi Iam using iframes HTML. How can I command that when I click on the Next-button, I jump to the beginning of the next page?]
Product:
[HTML iframes]
Assuming the button you want to press is in your iFrame
On your iFrame button press call:
// If you need to send any data with it
const jsonString = JSON.stringify(json);
window.parent.postMessage(jsonString, "http://mysite.com");
On your page with the iFrame:
import wixLocationFrontend from 'wix-location-frontend';
$w.onReady(async function () {
// Replace with name of your i-frame
$w("#your_iframe").onMessage( (event) => {
// Grab any data you need from the i-frame (if necessary)
const jsonData = JSON.parse(event.data);
// Go to the next page (set page name in Settings -> SEO Basics -> URL Slug)
wixLocationFrontend.to("/goToPageName");
});
});
Some more info on going to the next page:
More info for communicating between iFrame and page: