Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dmtomlins
Partner - Contributor II
Partner - 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
ErikWetterberg

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

View solution in original post

3 Replies
ErikWetterberg

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

dmtomlins
Partner - Contributor II
Partner - Contributor II
Author

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

fernandocalixto
Partner - Contributor II
Partner - Contributor II

For tabs insert that line on the .js mashup sheet:

Screenshot001.jpg

$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { qlik.resize();})