LOG IN
Back to Blog

There are tons of widgets out there these days and you may find some of them useful. Including them on your website with myRealPage is very straightforward: we have a special dedicated 3rd party weblet where you can simply copy and paste the include code. But there is also a fly in the ointment…

If you include a 3rd party widget code and that code fails it may ruin the display of your page, but even more importantly, it may interfere with our page editor and you may not even be able to correct this problem on your own without getting technical support involved. I have recently come across an example of this with Wibiya toolbar. It appeared to work for the website, but was causing errors during the page editing.

So I came up with a discretionary inclusion of the Wibiya toolbar code which will run it only when the page is displayed outside of the editing mode.

Typically you would be including something like this as your code:

<script src=http://cdn.wibiya.com/… type="text/javascript"></script>


INSTEAD, you should do something like this:


<script>
try
{
var url = window.location.href;
if( url.indexOf( "__manage__" ) == -1 ) {
var s = document.createElement( "script" );
s.src = "http://cdn.wibiya.com/……";
document.body.appendChild( s );
}
}
catch( e )
{
}
</script>


(Please replace “http://cdn.wibiya.com/….” with your Wibiya javascript code URL.)



Hope this helps!

 

Comments

No comments

Post Your Comment:

*indicates required fields.
Your Name:*
Please note, your email will not be shown publicly
Your Email (will not be published):*
Comment:*
Please type the text as it appears above: