Resetting embed content

I’m working on a redesign for a site that has a webstore with several different sections. I load the sections individually using embeds so I can use webflow buttons. In the past, I’ve done this using a separate page for every product category, but I would like to keep it all on one page and just swap out the embed depending on which button is clicked.

I know how to do all of that. My question, though, is how do I reset an embed?

Visitor clicks on Category 1.
Visitor clicks on Product 1 within Category 1.
Visitor clicks on Category 2. Category 1 is hidden and Category 2 is shown.
Visitor clicks back on Category 1. Product 1 within Category 1 is still active in that embed.

How do I change that last part? Right now, I’m just showing/hiding the embeds, so wherever that particular category was left is where it will be when it is shown again. Is there a way to force the reload of an embed?

Anyone? I would imagine there has to be a javascript way to do it.

Please provide a share link to your site.

This isn’t specific to a project. It’s a theoretical question. I have several clients who want webstores and this is a vital but straightforward issue to be able to solve.

Could someone with some JS ability at least respond to confirm that this is not possible?

I find it difficult to believe that no one here knows how to do this…

I believe you would need to code a reset or call a reset function if available in your embedded code. State management would be in the embedded code.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.