Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

dmtomlins
New Contributor II

Mashup - qlik.resize() not working

Hi Everyone,

I am fairly new to this, so apologies if I am way off the mark..

I am using Show() and Hide() to dynamically change the content of my mashup, and two graphs start off hidden and then need to be shown when further detail is required.

However these graphs are not showing, and i understand from looking around that a qlik.resize() function needs to be called in the call back of the show.

I have scripted the following:

$(document).ready(function(){

     $("#Detail").hide();                                         //hide detail

     $("#DetailButton").hide();

     $("#SummaryButton").click(function(){           //on clicking next button hide Summary info and show detail info

               $("#Summary").hide(1000);

               $("#SummaryButton").hide(1000);

               $("#Detail").show(1000, function() {

                    qlik.resize();

                   });

               $("#DetailButton").show(1000);

          });

    $("#DetailButton").click(function(){                      //on clicking back button hide detail info and return to summary info

          $("#Detail").hide(1000);

          $("#DetailButton").hide(1000);

          $("#Summary").show(1000);

          $("#SummaryButton").show(1000);

    });

});

And when I click the detail button: I get the following error:

issue.PNG

Could someone point me in the right direction please?

Thanks in advance David

1 Solution

Accepted Solutions
Highlighted
erik_wetterberg
Honored Contributor

Re: Mashup - qlik.resize() not working

Hi,

You need to load the qlik.js module. Something like:

require(["js/qlik"], function (qlik) {

and then set up your click handlers inside the function, where qlik is defined.

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
2 Replies
Highlighted
erik_wetterberg
Honored Contributor

Re: Mashup - qlik.resize() not working

Hi,

You need to load the qlik.js module. Something like:

require(["js/qlik"], function (qlik) {

and then set up your click handlers inside the function, where qlik is defined.

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
dmtomlins
New Contributor II

Re: Mashup - qlik.resize() not working

Hi Erik, I did have that called earlier in the script, however the above statement was outside the require. I have moved the brackets and now it works.

Thanks for your help.

david