
  if (Utils.trim(cat_name).length > 0)
  {
    Ajax.call('shophelp.php?is_ajax=1&act=add_catname', 'cat_name=' + cat_name, newGoodsTypeResponse, "POST", "JSON");
  }
}

function newGoodsTypeResponse(result)
{
  if (result.error == 0)
  {
    document.getElementById('listDiv').innerHTML = result.content;
    document.forms['theForm'].elements['cat_name'].value = '';
    document.forms['theForm'].elements['cat_name'].focus();
  }

  if (result.message.length > 0)
  {
    alert(result.message);
  }
}

{/liter