Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vince-jan
Partner - Contributor II
Partner - Contributor II

Extension resets on movement/selection

Hello Qlik users,

we're working on a little extension with an JQuery Accordion menu. The only problem we're facing is that the accordion menu

opens when making an selection or moving an object. Looks likes QlikView resets the page everytime we make an action.

JQ_howto_accordion-closed_victa.jpg

This is the image when we refresh our page. When making the selection or movement it turns like the image below:

JQ_howto_accordion-open_victa.jpg

Is there an explanation or fix?

Thanks in advance!!

Regards,

Vince

(victa bv)

2 Replies
Brian_Munz
Employee
Employee

hi,

It's hard to tell whether the issue is with how object extensions work or with your accordion code.  Could you please post the code?

thanks.

vince-jan
Partner - Contributor II
Partner - Contributor II
Author

Hello Brian,

sure we can!

var EXTENSION_NAME = 'howto';

var PATH = Qva.Remote + '?public=only&name=Extensions/' + EXTENSION_NAME + '/';

var scriptsmenu = ['http://code.jquery.com/jquery-1.10.2.js',

    'http://code.jquery.com/ui/1.11.1/jquery-ui.js'

];

function initLayout() {

    Qva.AddExtension(EXTENSION_NAME, function() {

        Qva.LoadCSS('http://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css');

        Qva.LoadCSS(PATH + 'style.css');

        $('head').append('<script>$(function() {$( "#accordion" ).accordion({collapsible: true,active:false});});</script>');

        var html = '';

        html += '<div id="accordion">';

        html += '<h3 class="accordionButton">Navigate sheets</h3>';

        html += '<div class="accordionContent">Klik op het gewenste tabblad om van gegevensblad te wisselen.<br />';

        html += '<img src="http://www.victa.nl/wp-content/uploads/howto/howto-sheets.jpg" class="img_accordion" alt="sheets" /></div>';

        html += '<h3 class="accordionButton">Making selections</h3>';

        html += '<div class="accordionContent">Klik op het gewenste tabblad om van gegevensblad te wisselen.<br />';

        html += '<img src="http://www.victa.nl/wp-content/uploads/howto/howto-sheets.jpg" class="img_accordion" alt="sheets" /></div>';

        html += '</div>';

        this.Element.innerHTML = html;

    });

};

function loadScriptsmenu() {

    if (scriptsmenu.length != 0) {

        Qv.LoadExtensionScripts(scriptsmenu, initLayout);

    } else {

        initLayout()

    };

};

loadScriptsmenu();

Thanks in advance!