I'm trying to use a javascript variable as my source video URL in HTML but cant figure it out. I'm able to collect the URL and store it as a variable using javascript, but dont know where to go from there. I'm trying to render this video inside a Widget in Jedox. a Widget in Jedox is typically used to render things via html/css/javascript. The widget UI is shown below. the Formula under Source is just a named range in the spreadsheet where this widget will be.
The code below is what is in the HTML editor for the Widget.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<script type="text/javascript">
function __exec(params)
{
var vCont = document.getElementById('valContainer'),
vContCnt = '<br>';
for (var param in params)
vContCnt = vContCnt.concat(params[param], '<br>');
vCont.innerHTML = vContCnt;
}
</script>
<div id="valContainer">
<video width="720" height="240" autoplay>
<source src=??? type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</body>
</html>
When i save and let it compile, this is all i see:
I dont know how to use the javascript variable in the HTML code as my source.