Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
Try that instead of your alert(...):
var s = "";
for(var i=0; i<text.length; i++) {
s += text + "\n";
}
alert(s);
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
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.
I am sorry I did not understand what you suggest
my Q: how can I use firebug console, I have web page viewer inside qlikview itself
If you have QV11, try that document extension that will load firebug lite in qlikview.
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
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);
}
});