<!– New Job board public integration –>
<script>
window.addEventListener(“message”, receiveMessage, false);
var parentMessageEvent;
function receiveMessage(event) {
if (event.origin == “https://ocni.member365.ca”) {
parentMessageEvent = event;
var iFrameID = document.getElementById(‘ampWebFormFrame’);
sendResizeToParentWindow(iFrameID);
} else {
return;
}
}
function autoResize(id) {
var iFrameID = document.getElementById(id);
sendResizeToParentWindow(iFrameID);
}
function sendResizeToParentWindow(iFrameID) {
var newHeight = parentMessageEvent.data + ‘px’ ;
if (iFrameID) {
var baseStyle = ‘background-color: transparent; overflow: auto; width:100%; border:0;’;
var newStyle = baseStyle + ‘height:’ + newHeight + ‘; min-height: ‘ + newHeight + ‘;’;
iFrameID.setAttribute(‘style’, newStyle);
}
if (parentMessageEvent != undefined) {
parentMessageEvent.source.postMessage(JSON.stringify({
event: ‘resize’,
height: newHeight
}), parentMessageEvent.origin);
}
};
</script>
<!– END –>
<iframe style=”background-color: transparent; overflow: auto; width:100%;height:100%; border:0;”
src=”https://ocni.member365.ca/publicFr/jobBoard/getJobDatabase/1″
sandbox=”allow-same-origin allow-popups allow-scripts allow-forms allow-top-navigation”
class=”ampFrame” id=”ampWebFormFrame” name=”ampWebFormFrame” scrolling=”no”
onload=”autoResize(‘ampJobBoardFrame’)”></iframe>