Stylesheet

 

It is possible to load an external stylesheet into the iframe. This setting can be changed by E-Golf4U and will affect all pages of the iframe. The stylesheet will be loaded directly after the default styling and so you can override all pre defined classes.


The stylesheet cannot be hosted at E-Golf4U but must be hosted at the server/website where the iframe will be loaded.

 

Adjust format 


Version 2 of the E-Golf4U iframe has the possibility to resize automatically based on the content that is shown on a specific page. This feature can be disabled as well.

The structure to enable this needs some adjustments to the default way of loading an iframe and works with the method that the E-Golf4U iframe can communicate with the website in which the iframe is loaded. By default this is not possible. To solve this it is necessary that the iframe includes a page from the domain of the website.

As a result of the iframe including and loading a page from the website of the club, it is possible to pass the internal height of the iframe to the website. The website then will be able to resize the iframe.

Below you can find the code that is needed to make this structure work at the website of the club. Create 2 files at the website and replace [club name] with the name of the club.

index.html
<script src="http://[club name].e-golf4u.nl/leden/iframe/js/resizehandler.js"></script>
<iframe id='egolf4u_iframe' src='http://[club name].e-golf4u.nl/leden/iframe/' style="width: 100%;"></iframe>


helper.html
<html>
<!--
E-Golf4U Iframe Helper

This page is on the same domain as the parent, so can
communicate with it to order the iframe window resizing
to fit the content
-->
 <body onload="parentIframeResize()">
   <script>
     // Tell the parent iframe what height the iframe needs to be
     function parentIframeResize()
     {
        var height = getParam('height');
        parent.parent.resizeIframe(height);
     }

     function getParam( name )
     {
       name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
       var regexS = "[\\?&]"+name+"=([^&#]*)";
       var regex = new RegExp( regexS );
       var results = regex.exec( window.location.href );
       if( results == null )
         return "";
       else
         return results[1];
     }
   </script>
 </body>
</html>


E-Golf4U will adjust the location of the helper.html file in the iframe to enable the cross domain resizing. Please contact E-Golf4U and provide the URL to this helper.html page.