Public MemNet self service pages including New Member Form(s), Member Directory, Event List / Booking Forms, Shopping Cart and Subscribe to Newsletter can be displayed on any website.
Note: When using a website supplied by MemNet or any website using WordPress or DNN please use the plugin/module available from MemNet Solutions. Please contact us for more details.
The options to display these pages are:
1. To link directly to the URL. This will display the page on a standalone page and can be set up to open in a new window.
2. These URL's can be displayed on a 3rd party site in an iframe. Doing so will "remove" the outer parts of the page automatically and display only the inner parts. See https://demomembers.memnet.com.au/NewMemberForm.aspx as an example which looks like this when viewed stand alone.
2.a. One issue with embedding a dynamic page (such as these) in an iframe is that the iframe will display a scrollbar when the content refreshes and/or is longer than the height set on the iframe. The following HTML and JavaScript function can be added to the page to automatically resize the iframe on each refresh of the iframe content from MemNet. This provides more seamless integration. The page mentioned above uses this function. Note also that the URL of the website must be entered into MemNet under Administration / System Configuration / Company Settings / Self Service on the Referrers tab in order for MemNet to communicate with the below JavaScript.
[Bold] text needs to be replaced with appropriate values. If multiple instances of this HTML code appears on the same page each instance must have a unique ID, they can share the same JavaScript function.
<div class="iframe-src">
<iframe id="View_my_iframe_1" width="100%" height="500px" scrolling="no"
src="[URL To Be Embedded]" onload="resizeCrossDomainIframe('View_my_iframe_1', '[MemNet URL]');"></iframe>
</div>
<div id="notHtml5" style="display: none">
<p>It seems your browser doesn't support HTML 5 and so you
will need to open this page in a new window.</p>
<p><a href="[URL To Be Embedded]" id="View_nonHtml5Link_1"
target="_blank">Please click this link to open the page in a new window.</a></p>
</div>
<script type="text/javascript">
var pm_is_supported = typeof (window.postMessage) == 'function';
function resizeCrossDomainIframe(id, other_domain) {
var iframe = document.getElementById(id);
if (pm_is_supported) {
window.addEventListener('message', function (event) {
if (event.origin !== other_domain) return;
if (isNaN(event.data))
return;
var height = parseInt(event.data) + 32;
iframe.height = height + "px";
}, false);
}
else {
iframe.parentNode.style.display = 'none';
document.getElementById('notHtml5').style.display = 'block';
}
}
</script>
Comments
0 comments
Please sign in to leave a comment.