user1633800
user1633800

Reputation: 331

Intergrating scene7 flyout viewer in website

currently we have a zoom viewer from scene7 on our website .now we are looking into replacing it with dhtml flyout viewer from adobe scene7. I was able to incorporate the new viewer on our page using the code below. Is there any way I can change the asset using JavaScript? Can you please direct me to correct documentation or example?

For example: we have apparels with different colors, when a user clicks on the swatch, I need to change the asset.

      <div id="flyout" style="position:relative;z-   index:10000000,width:360px;height:580px;"></div>
    <script type="text/JavaScript">
         var flyout = new s7js.flyout.AdvancedFlyout();
         flyout.setTargetId('flyout');
         flyout.setParameter('serverUrl', 'http://s7d1.scene7.com/is/image/');
         flyout.setParameter('asset', ‘xyz/ASC1578-TIRY');
         flyout.setParameter("zoomFactor", "2");
         flyout.init();
   </script>

Please help me find the solution.

TIA

Upvotes: 0

Views: 1305

Answers (1)

Paul Hoke
Paul Hoke

Reputation: 145

In the onclick method for the swatch you can have:

onclick="flyout.setParam('asset', 'xyz/someAsset'); flyout.init();"

Upvotes: 0

Related Questions