Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
somenathroy
Creator III
Creator III

Getting 'qva is undefined' error from java script.

Hi All,

I am trying to retrive Text of a TextBox object from a javascript function on a asp.net page. I have written the following code snipets :

<%@ Register Assembly="QlikViewWorkBench" Namespace="QT.QWW.WebControls" TagPrefix="qww" %>

<script type="text/javascript">

var obj;

function Init()

{

     obj = qva.GetQvObject("TX01", function () {});      

}

qva.BodyOnLoadFunctionNames.push("Init");

    function GetText()

    {

        var text = obj.QvaPublic.Data.GetSelected();      

       alert("the text value is: " + text);

    }

</script>

<input type = "submit" value = "HTML"    onclick="GetText()" />

At the compile time I am getting the error  :  'qva'  is undefined

Can any one pls. let me know what I am missing ?


Thanks,

Somnath.



1 Reply
somenathroy
Creator III
Creator III
Author

If I try the code :

<%@ Register Assembly="QlikViewWorkBench" Namespace="QT.QWW.WebControls" TagPrefix="qww" %>

<script type="text/javascript">

   

function GetText()

    {

        var text = qva.GetQvObject("TX01", function () {});

        alert(text.Data.GetText());

      }

</script>

<input type = "submit" value = "HTML"    onclick="GetText()" />

I am not getting any error  at compilation time. But at run time on button click getting error : 'Data' is null or not an object

Pls. help.