The example shows you how to make KoolComboBox autopostback on option selection.
<?php
require $KoolControlsFolder."/KoolComboBox/koolcombobox.php";
$kcb = new KoolComboBox("kcb");
$kcb->scriptFolder = $KoolControlsFolder."/KoolComboBox";
$kcb->styleFolder= "inox";
$kcb->width = "160px";
$select_value = "asia";
$select_text = "Asia";
if (isset($_POST["kcb_selectedText"]))
{
$select_value = $_POST["kcb_selectedValue"];
$select_text = $_POST["kcb_selectedText"];
}
$kcb->addItem("Asia","asia",null,($select_value=="asia"));
$kcb->addItem("Europe","europe",null,($select_value=="europe"));
$kcb->addItem("Africa","afica",null,($select_value=="afica"));
$kcb->addItem("America","america",null,($select_value=="america"));
$kcb->addItem("Australia","australia",null,($select_value=="australia"));
?>
<form id="form1" method="post">
<div style="padding-left:10px;padding-bottom:10px;">
Choose your region :
<?php echo $kcb->Render();?>
</div>
<div style="padding-left:10px;padding-bottom:10px;">
<b><?php echo $select_text;?></b> is selected
</div>
<script type="text/javascript">
kcb.registerEvent("OnSelect",function(sender,arg){
document.getElementById("form1").submit();
});
</script>
</form>