Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all!
I'm a beginner in Qlikview and I need your help!
I've been looked in Qlikview community but I don't find the solution to my problem. I've generated a macro to resize a ListBox when button is clicking, but is written in VB and I want it to be written in JavaScript.
In VB I have and works:
sub extendheight
set obj = ActiveDocument.GetSheetObject("SelectorsContainer")
set fr = obj.GetFrameDef
set pos = fr.Rect
pos.Width = pos.Width
pos.Height = 1525
obj.SetFrame fr,true,dummy
End sub
But with JavaScript I've tried:
function extendheight()
{
var obj = ActiveDocument.GetSheetObject("SelectorsContainer");
obj.style.Height = 1525;
}
or
function extendheight()
{
var obj = document.getElementByID("SelectorsContainer");
obj.style.Height = 1525;
}
and doesn't work.
Can someone help me?
Thak you for all!
Regards!
Jesús Pau.
Yes it is possible, only you need select this option in the macro editor
Hi,
Attached you have an example
Espero que te ayude
Saludos,
Enrique
Thak you Enrique for you answer!
But I thought in possibility to use JScript code in Qlikview's Macros instead of Macros that are created in VB.
Is it possible to use javascript instead of VB?
Some Idea?
Regards 😃
Yes it is possible, only you need select this option in the macro editor
Thank for API!
Is very useful for me 😃
Muchas Gracias 😃
Thank you!
This is a perfect solution!
Regards!
Hi,
Could you please explain me how to do this again? I am trying to get a list of bookmarks using a javascript function.
Here is the VB script function I have -
function bookMarkNames
bookmarks = ActiveDocument.GetDocBookmarkNames
for i = 0 to UBound(bookmarks)
bm = bookmarks(i)
msgbox(bm)
next
end function
Hi Aniket! Did you find the way to get a list of bookmarks using javascript?
Heh, I got it. Here is the code
function bookMarkNames(){
bookmarks = ActiveDocument.GetDocBookmarkNames().toArray()
for(var i = 0; i < bookmarks.length; i++){
bm = bookmarks
qvlib.msgbox(bm)
}
}