autoComplete无法正常工作

this is my code for use auto complete, that work correctly when i use single file for example aci.php . ( working correctly )

<?php
include_once('AFactory.class.php');
$db=new AFactory();
$db->getDBO();
if(isset($_POST['queryString'])) 
{
        $sql = "SELECT `name` FROM `liste_kala` WHERE `name` LIKE '%{$_POST['queryString']}%' LIMIT 0 , 30";
        $result=$db->setQuery($sql);
        $query=$db->setQuery($sql);
        $result=$db->loadAssoc($query); 
        // echo '<pre>';print_r($result);echo '</pre>';
        if($result) 
        {
            foreach ($result as $value) echo '<li onClick="fill(\''.$value['name'].'\');">'.$value['name'].'</li>';
        } 
}
?>

but i pasting that code into action.php file i can check post method for actions but not working this way: JQUERY method:

function lookup(inputString) {
    if(inputString.length == 0) {
        // Hide the suggestion box.
        $('#suggestions').hide();
    } else {
        $.post("aci.php", {queryString: ""+inputString+"" , postaction:'autocomplete' }, function(data){
            if(data.length >0) {
                $('#suggestions').show();
                $('#autoSuggestionsList').html(data);
            }
        });
    }
}

ACTION.PHP

<?php
include_once('AFactory.class.php');
$db=new AFactory();
$db->getDBO();
$action=$_POST['queryString'];
switch ($action)
{
    case 'autocomplete':
        if(isset($_POST['queryString'])) 
        {
                $sql = "SELECT `name` FROM `liste_kala` WHERE `name` LIKE '%{$_POST['queryString']}%' LIMIT 0 , 30";
                $result=$db->setQuery($sql);
                $query=$db->setQuery($sql);
                $result=$db->loadAssoc($query); 
                // echo '<pre>';print_r($result);echo '</pre>';
                if($result) 
                {
                    foreach ($result as $value) echo '<li onClick="fill(\''.$value['name'].'\');">'.$value['name'].'</li>';
                } 
        }
            break;

}
?>
$action=$_POST['queryString'];

should be:

$action=$_POST['postaction'];