//**** List Province (Start) ***//
function ListTb_type(SelectValue)
{
//*** Insert null Default Value ***//
var myOption = new Option('','')
frmMain.tb_subtype.options[frmMain.tb_subtype.length]= myOption
<?
$intRows = 0;
$strSQL = "SELECT * FROM tb_subtype ORDER BY id_subtype ASC ";
$objQuery = mysql_db_query($dbname, $strSQL);
$intRows = 0;
while($objResult = mysql_fetch_array($objQuery))
{
$intRows++;
?>
x = <?=$intRows;?>;
mySubList = new Array();
strGroup1 = <?=$objResult["ref_id_type"];?>;
strValue = "<?=$objResult["id_subtype"];?>";
strItem = "<?=$objResult["name_subtype"];?>";
mySubList[x,0] = strItem;
mySubList[x,1] = strGroup1;
mySubList[x,2] = strValue;
if (mySubList[x,1] == SelectValue){
var myOption = new Option(mySubList[x,0], mySubList[x,2])
frmMain.tb_subtype.options[frmMain.tb_subtype.length]= myOption
}
<?
}
?>
}
//**** List Province (End) ***//
//**** List Amphur (Start) ***//
function ListTb_subtype(SelectValue)
{
frmMain.tb_showbrand.length = 0
//*** Insert null Default Value ***//
var myOption = new Option('','')
frmMain.tb_showbrand.options[frmMain.tb_showbrand.length]= myOption
<?
$intRows = 0;
$strSQL = "SELECT * FROM tb_showbrand LEFT JOIN tb_brand ON tb_showbrand.ref_id_brand = tb_brand.id_brand ORDER BY ref_id_brand ASC ";
$objQuery = mysql_db_query($dbname, $strSQL);