Redirect user on tab v1

To redirect user on a specific tab with an URL, you can use the code above. You will need to have Indicator version 6.25.4, and you will have to add specific custom code on your V1 and V2 ‘main’ indicator document. By main I mean the document that add the others

For example in my case it is ‘General information’

Then, after adding the code above, you will just have to call your URL with the parameter created (here it is II_TAB) and give it the index of the tab (1, 2, 3 etc…).


Custom javascript on your main indicator

<script>

document.addEventListener("myCustomEvent", function() { 

var x = jQuery('input[param-id="1264"]').val() ;
     if(x) {
           jQuery('.tab_pilot4it_indicators li[position="'+x+'"] a').trigger({type: 'mouseup',which: 1}).trigger('click')
     }
});

</script>

Here 1264 is the ID for my parameter II_TAB


Custom code on V2 main indicator :


HTML

<script src="/media/com_projid/resources/js/jquery.min.js"></script>

Javascript

jQuery(document).ready(function() {
    if(params.IPC_TAB) {
        var event = new CustomEvent('myCustomEvent')
        setTimeout(function(){ window.parent.document.dispatchEvent(event);}, 500);
        window.parent.document.dispatchEvent(event);
    }
});

Do not forget to create and add the parameter II_TAB in V1 report or V2 regarding your usage of the filter bar.