Hello,
we're trying to select data from QlikView, displaying it works, with the function "onclick". The example from below is working fine with our data. But we're using the html function "Select" ('<option value='+ i +>' cycling through the data). The question is how to use the example code with the function: "Select" instead of tables. We've read some things about onclick doesn't work on select, therefore we have to use onchange, but selecting data still not works.
Somebody used this kind of script with a selection tag?
Qva.AddExtension('CVL/BasicTable', function() {
// Create a variable to hold generated html
var html = "<table>";
// Local variable to hold the reference to QlikView
var _this = this;
// function to handle users clicking on a row
window.oncvlrowclick = function(rowIx)
{
_this.Data.SelectRow(rowIx);
}
// Cycle Through the data
for (var i = 0; i < this.Data.Rows.length; i++) {
// get the row
var row = this.Data.Rows ;
// Generate html
html += "<tr><td onclick='oncvlrowclick("+i+")'>" + row[0].text + "</td><td onclick='oncvlrowclick("+i+")'>" + row[1].text + "</td></tr>";
}
// Finalise the html
html += "</table>";
// Set the HTML
this.Element.innerHTML = html;
},true);
Greetings,
Victa
Carlo Vruwink