So I made a custom size del.icio.us Widgetbox widget for my Ning profiles, but Widgetbox won’t put it in their gallery because the links don’t open in a new window. I added the code they provide to make it do this but it appears not to work. I think because the links are being created by the del.icio.us javascript rather than already being in the widget. Does anyone know how to fix this? The other del.icio.us tagroll widget must have managed it because it’s in the Widgetbox gallery, but you can’t resize that one on Ning. Here’s my code:
<script>
var i;
var aTags = document.getElementsByTagName(“a”);
for (i=0; i < aTags.length; i++) {
aTags[i].setAttribute(“target”, “_new”);
}
var areaTags = document.getElementsByTagName(“area”);
for (i=0; i < areaTags.length; i++) {
areaTags[i].setAttribute(“target”, “_new”);
}
</script>
<div style="padding:7px;font-family:Arial;
width:${config.width}px;">
<script type="text/javascript"
src="http://del.icio.us/feeds/js/tags/${config.username}
?count=${config.number};
size=${config.minimum}-${config.maximum};
color=${config.little-colour}-${config.big-colour};
title=${config.title};name">
</script>
</div>
_____________________________EDIT___________________________
Solution! OK so I wrote to Widgetbox support eventually and they’ve helped loads. They’ve now added a ‘code snippet’ inserter into the widget code editor which adds the correct code for making links open in a new window. Apparently the problem was with copy-pasting the code into my widget made the quotes into speech marks rather than those code type straight quotes. So now that’s fixed. BUT sometime in the last week the actual widget itself has broken on Ning. The widget is fine on Widgetbox, but even the ‘add to Ning’ option has disappeared. I can’t find an ‘add to Ning’ option on any of the other widgets either so I wonder if Ning has changed something and become incompatible? Anyway, I’ve asked Widgetbox about this again so bear with me and I’ll let you know what they say…
Leave a Reply