We recently upgraded from QlikView 10 SR3 to SR4 and noticed that our application stopped executing the onUpdate events for objects. The current documentation demonstrates the following...
<script type="text/javascript">
var MyQvObject;
MyListIsUpdated = function() {
alert("Number of enabled values: " +
MyQvObject.QvaPublic.Data.GetEnabled().length);
}
MyInit = function() {
MyQvObject = qva.GetQvObject("LB1457", MyListIsUpdated);
}
Qva.BodyOnLoadFunctionNames.push('MyInit'); // notice the use of the name as a string
</script>
QlikView 10 SR 4 now requires actual functions not strings...
<script type="text/javascript">
var MyQvObject;
MyListIsUpdated = function() {
alert("Number of enabled values: " +
MyQvObject.QvaPublic.Data.GetEnabled().length);
}
MyInit = function() {
MyQvObject = qva.GetQvObject("LB1457", MyListIsUpdated);
}
Qva.BodyOnLoadFunctionNames.push(MyInit); // notice the use of the name as a string
</script>
You can also do this now...
<script type="text/javascript">
var MyQvObject;
MyListIsUpdated = function() {
alert("Number of enabled values: " +
MyQvObject.QvaPublic.Data.GetEnabled().length);
}
Qva.BodyOnLoadFunctionNames.push(function() {
MyQvObject = qva.GetQvObject("LB1457", MyListIsUpdated);
}); // just pass in the function
</script>