How to set up Whitelabel iFrame

Modified on Mon, 18 Sep, 2023 at 4:25 PM

This help document details how to set up the Whitelabel iFrame.


TABLE OF CONTENTS


The venue/supplier search and the enquiry process can be embeded into your site using an iframe by adding a HTML code similar to the one below:

<iframe src="https://xx-iframe.myeventsportal.co.uk"         marginheight="5" marginwidth="5" frameborder="0" scrolling="auto"        height="250" width="500"> </iframe>

The end results should look like below:

Change default search tab

The search tab can be defaulted to "supplier search" by changing the iframe URL to https://xx-iframe.myeventsportal.co.uk/suppliers


Layout and Styling

The iframe is designed to be responsive, i.e. the layout of the content automatically changes to fit the size of the iframe. The main theme color is the same as the the main whitelabel site, which can be configured in the whitelabel setting area in GRATIS

iFrame height auto resizing

If you don't like the vertical scroll bar in the iframe when page goes too long, there is an option to make the iframe adjusts the height automatically according to the height of the contents. This functionality can be enabled by referencing a Javascript library on your site as shown below:

<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> <script src="https://raw.githubusercontent.com/davidjbradshaw/iframe-resizer/master/js/iframeResizer.min.js"></script> <script type='text/javascript'>     $('iframe[name=xxiframe]').iFrameResize({log: false, enablePublicMethods: true, heightCalculationMethod:'lowestElement'}); </script>     

There is no need to add reference to jQuery if it's already used on your site.

Safari iframe page cookies fix

Safari has got a very conservative security policy that prevents crossdomain iframe pages to create cookies within the parent window. To overcome this issue you need to reference a Javascript library that contains the cookies fix.

JS library URL: {your whitelabel iframe domain url}/scripts/safarifix.js e.g. https://xxx.myeventsportal.co.uk/scripts/safarifix.js

Please note, if the cookies fix library is not referenced then the iframe might work incorrectly on Safari browsers.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article