Hi,
Embedding a NTWS (Form) in an Iframe on an external website is resulting in the the NTWS page being called continuously.
In checking in with ChatGPT, the proposed answer it seems is add some JS to the NTWS page, see below.
Is this the correct way?
I have not added any JS before,
where and how to add this if this is correct way to do this?
The NTWS will only be used for this embedding purpose.
thanks
Johan
1. JavaScript to Detect Recursive Loading
Add this JavaScript snippet to the managemember page:
javascript
Copy code
if (window.location !== window.parent.location) {
// Check if the page is loaded within an iframe, then prevent recursive load
if (window.location.href === window.parent.location.href) {
window.location = 'about:blank'; // Redirect to blank to stop recursion
}
}
This code verifies if the managemember page is loaded in an iframe and compares the URL of the iframe with its parent. If they match, it stops further recursive loading by redirecting the iframe to a blank page.