Hide Page Tabs

Posted by ionacaerex on 12-Oct-2016 14:23

Hello

trying to hide a tab on a multitab page...

using this code

<script>

rbf_showOrHidePageTab(0, false)

</script>

What value should I be inserting in the first variable field? 0?1? etc?

doesn't seem to work...any ideas.

Thanks

All Replies

Posted by Mayank Kumar on 12-Oct-2016 22:10

Hello

The first parameter should be the index of the tab (0-based).

Regards,

Mayank

Posted by ionacaerex on 13-Oct-2016 13:42

Please can you explain 0-based.

Is the first tab 0, then what is the third tab? 3?

Posted by stayal on 13-Oct-2016 14:06

Hi ionacaerex,

Yes the first tab index would be 0,so accordingly third tab index would be 2 (it goes like 0, 1, 2...and so on).

Regards,

Shivali

Posted by ionacaerex on 13-Oct-2016 14:34

OK

Thanks but 0 works and first tab is hidden. Any other value does not hide the subsequent tabs.

Does the HTML have to be on the specific tab or can it be in one central point on the '0' tab screen?

Sorry - but I am not very technical.

Thanks

Posted by stayal on 13-Oct-2016 14:54

I am sorry can you please give more details about the use case?

Thanks

Posted by ionacaerex on 13-Oct-2016 15:03

This is the code which is included on the first tab screen.

<script>

 rbf_showOrHidePageTab(0, false)

 rbf_showOrHidePageTab(2, false)

</script>

It hides Tab 1 (i,e, zero statement), but Tab 3 is not hidden.

I have also added the second statement within the tab 3 screen - but no luck either.

Thanks

Posted by stayal on 14-Oct-2016 00:13

Hi ionacaerex,

The script works for me,hiding both the tabs.I am not able to reproduce the issue,can you please share the sample app.

Thanks,

stayal

Posted by ionacaerex on 14-Oct-2016 01:36

Are you embedding in the page or applying onload()?

Posted by Vimalkumar Selvaraj on 14-Oct-2016 01:47

Hi,

You can embed script component on page and execute your script that does tab hide on a callback of Pagerender event.

Added sample script below for you reference,

<script>

 if(rbf_isNewUI()){

    rb.newui.util.addEventListener(rb.newui.util.customEvents.rbs_pageRender,hideTabs); // Custom page render event

 }else{

//this is for old UI

   $(document).ready(function(){

     hideTabs();

   })

 }

 function hideTabs(){

   rbf_showOrHidePageTab(1, false);

 }

</script>

 

Hope this helps,

Vimal.

Posted by ionacaerex on 14-Oct-2016 10:55

This seems to be an erro relating to the old UI - I have tried it on the new UI and old works well. Only tab 1 hides on the old UI. Have tried across different screens in the old UI (same error). while works fine in the new UI.

Can it be investigated/fixed?

Thanks

This thread is closed