Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

listbox and webpage viewer control

I have to create simple application which uses web page viewer (custom object)

and I have one sheet object and on that i have "sales compass.qvw"(a demo came with qlikview) and webpage viewer object in which I have url which take querystring as parameter and do some work

i am using this code

var text;

        var myobj1 = this.GetQvObject("LB02", function () {

            text = myobj1.QvaPublic.Data.GetSelected();

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

        });

LB02 is my list box

i am getting this msg in alert box the text value is:object Object

does someone knows the solution

1 Solution

Accepted Solutions
Not applicable
Author

I don't know what is the type of the objects in the array (as always the documentation is missing...). The most efficient way would be to use firebug which is a debugging extension for firefox, and to do:

        var myobj1 = this.GetQvObject("LB02", function () {

            text = myobj1.QvaPublic.Data.GetSelected();

            for (var i = 0; i < text.length; i++) {

                console.dir(text);

            }

        });

This way you'll be able to see the members of the array objects in the firebug console.

View solution in original post

7 Replies
Not applicable
Author

Try that instead of your alert(...):

var s = "";

for(var i=0; i<text.length; i++) {

     s += text + "\n";

}

alert(s);

Not applicable
Author

thanks for quick reply and your time

I tried what you said like this

var text;

        var s = "";

        var myobj1 = this.GetQvObject("LB02", function () {

            text = myobj1.QvaPublic.Data.GetSelected();

            for (var i = 0; i < text.length; i++) {

                s += text + "\n";

            }

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

        });

but got the same msg in alert box the text value is:object Object

I also tried

var text;

        var s = "";

        var myobj1 = this.GetQvObject("LB02", function () {

            text = myobj1.QvaPublic.Data.GetSelected();

            for (var i = 0; i < text.length; i++) {

                s += text + "\n";

            }

            alert("the text value is: " + s.name); // .name and also tried s.value

        });

i tried this also

    alert("the text value is: " + s.name);

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

but got this msg in alert box the text value is:undefined

but one thing I am able to read know with you help is size of selection

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

do you have any other suggestions

thanks again

Not applicable
Author

I don't know what is the type of the objects in the array (as always the documentation is missing...). The most efficient way would be to use firebug which is a debugging extension for firefox, and to do:

        var myobj1 = this.GetQvObject("LB02", function () {

            text = myobj1.QvaPublic.Data.GetSelected();

            for (var i = 0; i < text.length; i++) {

                console.dir(text);

            }

        });

This way you'll be able to see the members of the array objects in the firebug console.

Not applicable
Author

jgeorge

Not applicable
Author

If you have QV11, try that document extension that will load firebug lite in qlikview.

Not applicable
Author

jgeorge

it worked.

thanks again for your help and time

i do not know where i can rate you but i marked answer as correct and clicked the  like button

have a good day

bye

Not applicable
Author

Hi jgeorge

is there any way I can read the listbox on button(one of the custom object) click

on button click do this

    var myobj1 = this.GetQvObject("LB02", function () {

            text = myobj1.QvaPublic.Data.GetSelected();

            for (var i = 0; i < text.length; i++) {

                para1 = (text);

            }

        });