Using AJAX to force block tab selection

Hello
I have a Form with x3 blocks.
Each block is setup as a tab (thus showing x3 separate tabs, “Contact List”, “Contact Details” and “Contact Activity” )
In the first block (Contact List), I have added a Grid Application showing all contacts
In the 2nd block (Contact Details), I have another Form application showing the selected Contact Details

Objective:
What I am trying to accomplish is, when the user selects a Contact from the Contact List,
the Contact Details tab is selected showing the selected Contact Details

I am battling with:

  1. the automation of the tab selection/click once the user selects the Contact from the Contact List
  2. then the Form in the Contact Details being refreshed, with the selected uniqueID of that contact

You can change the tab with this:


    sc_ajax_javascript('sc_change_tabs', array(false, 'hidden_bloco_4', 'id_tabs_4_4'));
    sc_ajax_javascript('sc_change_tabs', array(false, 'hidden_bloco_5', 'id_tabs_4_5'));
    sc_ajax_javascript('sc_change_tabs', array(false, 'hidden_bloco_6', 'id_tabs_4_6'));
    sc_ajax_javascript('sc_change_tabs', array(false, 'hidden_bloco_7', 'id_tabs_4_7'));
    sc_ajax_javascript('sc_change_tabs', array(true,  'hidden_bloco_8', 'id_tabs_4_8'));

You find the variable names “hidden_bloco_x” and “id_tabs_4_x” when you look at the source code from the form (<F12> in IE, Chrome or firefox). In this example tab 5 is selected (see the true parameter).

Thanks Reinhard

Better serious
sc_ajax_javascript (‘sc_control_tabs_5’, array (‘6’));