Hi Nebilim,
welcome
in order to have more than one group you must not create a second instance of the class.
Use just the initial one.
Here is an example from one of my codes
$oSel1 = new sc_ajax_select_boxes();
// add first select box group 1
$oSel1->add_select_box('mp3dotnet_def_musical_instruments','instrument_id',
'instrument','instrument_id','','instruments_parent_1',
'instruments_parent_1',' style="width:200px;" ', 'parent_id=0');
// add second select box group 1
$oSel1->add_select_box('mp3dotnet_def_musical_instruments','instrument_id',
'instrument','instrument_id','','instruments_child_1',
'instruments_child_1',' style="width:200px;" ');
// link those 2
$oSel1->link_select_boxes('instruments_parent_1','instruments_child_1', 'parent_id',-1);
// add first select box group 2
$oSel1->add_select_box('mp3dotnet_def_musical_instruments','instrument_id',
'instrument','instrument_id','','instruments_parent_2',
'instruments_parent_2',' style="width:200px;" ', 'parent_id=0');
// add second select box group 2
$oSel1->add_select_box('mp3dotnet_def_musical_instruments','instrument_id',
'instrument','instrument_id','','instruments_child_2',
'instruments_child_2',' style="width:200px;" ');
// link those 2
$oSel1->link_select_boxes('instruments_parent_2','instruments_child_2', 'parent_id',-1);
// add first select box group 3
$oSel1->add_select_box('mp3dotnet_def_musical_instruments','instrument_id',
'instrument','instrument_id','','instruments_parent_3',
'instruments_parent_3',' style="width:200px;" ', 'parent_id=0');
// add second select box group 3
$oSel1->add_select_box('mp3dotnet_def_musical_instruments','instrument_id',
'instrument','instrument_id','','instruments_child_3',
'instruments_child_3',' style="width:200px;" ');
// link those 2
$oSel1->link_select_boxes('instruments_parent_3','instruments_child_3', 'parent_id',-1);
somewhere add javascripts
<?php $oSel1->place_jscripts(); ?>
somewhere in the form place first group of select boxes
<?php $oSel1->show_select_box('instruments_parent_1'); ?>
<?php $oSel1->show_select_box('instruments_child_1'); ?>
somewhere else add second group of select boxes
<?php $oSel1->show_select_box('instruments_parent_2'); ?>
<?php $oSel1->show_select_box('instruments_child_2'); ?>
and the third group of select boxes
<?php $oSel1->show_select_box('instruments_parent_3'); ?>
<?php $oSel1->show_select_box('instruments_child_3'); ?>
and trust me it works
