If you use the public page iframe to embed your Bookwhen schedule into your website and have long schedule lists and/or event descriptions, you might have noticed the iframe showing a scroll bar. Or you might have manually increased the iframe's height and seen a lot of blank space when your public page has much less information. Please note that this is, unfortunately, how iframes work.

Due to your website and your Bookwhen public page being on different domains, your website can't detect the height of the iframe contents and therefore adjust the manually-set height as it changes. This is due to security features built into web browsers.

However, browsers do allow the ability to send "messages" between an iframe (your Bookwhen public page) and the page it's on (your website), and this is secure. Bookwhen currently uses this method to "send" the dimensions of the public page whenever it changes. Hence, all your website has to do is "listen" out for these messages and update your iframe's height accordingly.

Conveniently, we also provide a JavaScript file that does everything for you! All you need to do is include this script on your page, and your iframe will resize its height whenever its content changes.

If you are a web developer or have a web developer administering your site, then all you need is the URL of our JavaScript file - https://cdn.bookwhen.com/js/iframe_resizer.js. You may also write your own script that "listens" for the messages sent by the iframe.

If you are currently using a website builder (Wix, Squarespace, Godaddy, etc.), then try to find the area where you can add "scripts" or "JavaScripts" and add the above URL.

Or, if you can insert JavaScript HTML into your page, you can add the following wherever you want:

<script src="https://cdn.bookwhen.com/js/iframe_resizer.js"></script>

💡 Note for non-developers: Nothing happens if you don't listen for these messages. It all goes into a 'void'. Browsers know to erase anything that gets "sent" but isn't "listened" for. This is to ease your mind if you are worried about sending Bookwhen data. You may inspect your public page iframe to see what's happening, and if you know a web developer, they can help you to understand it.

If you have any questions, please get in touch with the support team via live chat or by emailing support@bookwhen.com

Did this answer your question?