Теперь проблем с обновлением нет, только периодически две строки добавляется, вместо одной:
function admin_showCategory()
{
req_show_cat = getXmlHttpRequest();
req_show_cat.onreadystatechange = RequestComplete;
req_show_cat.open("POST","action.php", true);
req_show_cat.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
param="who=list_category";
req_show_cat.send(param);
}
function Success_Category()
{
if (req_show_cat.readyState == 4 && req_show_cat.status==200)
{
admin_showCategory();
}
}
function AddCategory()
{
req_add_cat = getXmlHttpRequest();
req_add_cat.onreadystatechange = Success_Category;
req_add_cat.open("POST", "action.php", true);
req_add_cat.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
param="who="+document.getElementById('who').value+"&id_theme="+document.getElementById('id_theme').value+"&name_category="+document.getElementById('name_category').value+"&action=insert";
req_add_cat.send(param);
}