send scrollTo message to wix parent from iframe with external url

I have a wix website with a formstack form embedded in an iframe. On submitting the formstack form I want the parent wix window to scroll to the top.

Inside the formstack form I am using

and on the wix parent I am using

This is not working. What could I be doing wrong? Thanks in advance.

Ufff. I guess the editor shows a couple of red dots on the lines with , window.addEventListener, etc
This cannot be the full code. Please post (including red dots), there could be many reasons (but 1 is: you can´t do standard Javascript accessing the DOM inside a Wix Page).
Just trying to sort out something similar, so you have my ear.

Thank you for your input. What you see is what I was trying to use. I have posted an inquiry looking for wix expert to assist but nothing yet. Getting support and direction on this level of wix customization seems challenging.

Corvid understands all of Javascript, except for anything that accesses the DOM. This keeps the user from inadvertently “breaking” something. Accessing document elements such as div, span, button, etc is off-limits. The way to access elements on the page is only through $w.

See the article Working with the HTML Element in Corvid for details.

Thank you for reply Yisrael. I was trying to use $w on wix page through Tracking&Analytics section with no success. Where am I to put the code and do the import?

See the tutorial for using Tracking&Analytics .

For more information on Tracking and Analytics, you can search the Help Center Docs , and contact the Wix support team .