Skip to content

Zerista iFrame

An iFrame is required to display a Zerista webpage on an external site.

The example code provided below should be used when embedding a webpage from Zerista. The javascript is used to resize the window appropriately, and the iFrame is used to display the webpage content. Before inserting code, the src on the iFrame must include the URL to the page you would like to embed (“ ”).

The URL placed in this line of code should have an “e.” prepended to it (ex, e.myfamecon.zerista.com). The “e” stands for embed, and will display a slimmed down version of the Zerista webpage that is optimal for embedding.

Example javascript and iframe code:

<script type="text/javascript">
 ZERISTA_MESSAGE_RESIZE = 'zeristaResize'
 ZERISTA_MESSAGE_CLICK_TAG = 'zeristaClickTag'

function handleZeristaMessage(message)
 {
 if (!message.origin.match(/zerista/))
 return

var parts = message.data.split(/:/)
 var key = parts[0]
 var value = parts[1]

if (key == ZERISTA_MESSAGE_RESIZE)
 resizeIFrame(value)
 else if (key == ZERISTA_MESSAGE_CLICK_TAG)
 clickTag(value)
 }

function resizeIFrame(height)
 {
 var iframe = document.getElementById('zerista_iframe')
 iframe.style.height = height + 'px'
 iframe.style.overflow = 'hidden'
 }

function clickTag(tagName)
 {
 }

/* Hook up message event handler */
 if (window.attachEvent)
 window.attachEvent("onmessage", handleZeristaMessage)
 else
 window.addEventListener("message", handleZeristaMessage, false)
</script>

<iframe id="zerista_iframe" src="http://e.<ZERISTA PAGE HERE>"></iframe>

Example iFrame with src:

<iframe id="zerista_iframe" src="http://e.myfamecon.zerista.com/event/summary?owner=other&owner_id=294348"></iframe>

Follow

Get every new post delivered to your Inbox.