FIXED: Frog’s Kerboodle widget

Kerboodle is an online subscription resource site.  Frog is our VLE.   And Frog’s official Kerboodle widget allows single-sign-on from Frog to Kerboodle.   So no different usernames or passwords to remember.

Kerboodle

Kerboodle’s Frog widget. Big, isn’t it.

Unfortunately, when I downloaded the official widget from Frog, we discovered a really odd issue.  For our students and teachers on Windows XP machines running IE8* the widget doesn’t appear as a button?    The image is there, but that’s it??  My best guess is that some obscure security setting prevents part of the widget code from running.

Boring background bit (and some name checking)

Fortunately, I was at a Microsoft event hosted at the impressive Harton Technology College in South Shields.   Sean O’Shea (@SeanOfTheNorth) from Microsoft had invited me there to have a look at Surface and Office 365 and both are really very cool.   But more about these in future posts.  Frog had a stand there and Frog’s partnership manager Adrian Bantin (@thebantin) was on hand.

Adrian is a really nice guy and when I explained the issue, he sent me the FDP code that sits behind the widget.

Solution

I found a solution.  This might not work for you, but it works for us.  I’ve also sent it to Frog so they can pull it apart and see if they like it.   But in the meantime, this seemed to be the code which caused the issue:

widget.onLoad = function(){

var link = widget.createElement(‘a’,{‘onClick’:’javascript:openKerboodle();’,’style’:’cursor: pointer;’});    

link.setHTML(‘<img src=”http://appstore-misc.frogdev.co.uk/resources/images/uwa/kerboodle/logo.png” /></br>’);  

widget.setBody(link);                

}

Now, I think what’s happening is that this line:

var link = widget.createElement(‘a’,{‘onClick‘:’javascript:openKerboodle();‘,’style’:’cursor: pointer;’});

isn’t rendering in the browser.   But there’s more than one way to skin a cat or in this case call a Javascript function.  Which is what this code is doing.  It’s saying when you click on the image, run the function openKerboodle().

Another way of doing exactly the same thing is:

onClick=”javascript:openKerboodle();“>

This method is more traditional, the code goes inside the body tag instead of inside an onLoad function and most importantly (seems to) work.

Full code

xmlns=”http://www.w3.org/1999/xhtml”      

xmlns:frog=”http://fdp.frogtrade.com/ns/”      

xmlns:widget=”http://www.netvibes.com/ns/“>    

<head>        

<title>Kerboodle</title>        

<meta name=”frogLib” content=”1.1″ />        

// <![CDATA[
src
=”
// ]]>https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js”></script>

    <script>            

 <![CDATA[

                widget.onLoad = function(){                                   

openKerboodle = function(){                        

 UWA.Data.getText(‘http://www.kerboodle.com&#8217;, function(data){displayHtml(data);});                    

};               

  }

                displayHtml = function(data){                    

window.open(data);                               

}

 ]]>    

</script>

</head>

<body>

openKerboodle();”> http://appstore-misc.frogdev.co.uk/resources/images/uwa/kerboodle/logo.png /> </a>

</body>

</html>

Here’s a link to the text version, just in case the browser corrupts the code.  Make sure you download the file.  For some reason, the code doesn’t show up in the MediaFire browser.

 

 

*Can’t use other browsers.   Please don’t bore me with how wonderful Chrome and Firefox are.   Don’t care, not my department.  We’re stuck with IE.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: