Iframe Integration

You can integrate a SimulArt store to any web page using an iframe like this one:





The iframe width and height will automatically adjust if you add this to the head of your page:

<script src="https://simulartstudio.com/ext/iframeResizer/iframeResizer.min.js" type="text/javascript"></script>



This block of code can be added where you want your iframe to load:

<style>iframe{width:100%}</style>
<iframe id="simStore" scrolling="no" style="border: none;" onload="iFrameResize({autoResize:true,checkOrigin:false})"></iframe>
<script>document.getElementById("simStore").src = "https://simulartstudio.com/yourFolder/"</script>



You may add the following code to your CSS block (under Settings -> Web Store) to completely hide the top navigation.

.navbar {
display: none;
}



Optionally and for optimal results, the parent viewport width and height in pixels should be supplied. The viewport dimensions can be acquired in javascript and passed to the iframe URL. This example works on some platforms:

<script language="javascript">
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
</script>

<style>iframe{width:100%}</style>
<iframe id="simStore" scrolling="no" style="border: none;" onload="iFrameResize({autoResize:true,checkOrigin:false})"></iframe>
<script>document.getElementById("simStore").src = "https://simulartstudio.com/yourFolder/?parentWidth=" + myWidth + "&parentHeight=" + myHeight;</script>



Back



© SimulArt Inc.