Video Upload Widget Issues in Blackboard v9.1

Since the upgrade of our instance of Blackboard (to version 9.1) we’re having some issues with the Video Upload widget that until recently was working. The widget consists of just HTML and Javascript and should work in any system, but there’s something about the way our live instance of the new version of Blackboard treats the script.

Blackboard doesn’t have a problem with Javascript in modules (the little boxes that sit of the tabs within Blackboard) per se. For example, I have been able to insert the following code and have it execute with no problems:

<script type="text/javascript">
function getUrlVars() {
var vars = [], hash;
var hashes=top.location.href.slice(top.location.href.indexOf('?')+
for(var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars[hash[0]] = hash[1];
return vars;

function uploadClicked() {
if(document.getElementById("btnUpload").value == "Upload") {
document.getElementById("btnUpload").value = "Cancel";
document.getElementById("uploadBar").style.visibility = "visible";
} else {
document.getElementById("inpFilename").value = "";;

var hash = getUrlVars();

if ('f' in hash) {
var rdgPathname = '';
var videoUrl = hash['f'];
var video320 = '';
function loadHello() {
document.getElementById('hello').innerHTML="insert a new message";
<a id="hello" onclick="loadHello()">Hello world...</a>

Part of this is script from the actual widget, part of it just a function I have written to test that it is possible to interact with the DOM. This works: the user clicks on “Hello world…” and the message changes to the long string given with the function loadHello().

The problem being that if I then try and add HTML tags to this string, Blackboard reformats the code, effectively getting rid of spacing between all the variable names so that, for example, if (‘f’ in hash) becomes the unreadable if(‘f’inhash).

I have no idea why this is but I’m currently investigating both the possible settings in Blackboard that might causing this and alternative ways of presenting the code.

About Guy

I am currently Enhancement Officer (for Education Technologies) at the University of Reading. I am also studying for a Masters in Research at the University's School of Systems Engineering.
This entry was posted in Plugin development, Video and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *