Skip to content

龙口市中际包装机械有限公司

Site Tools
Narrow screen resolution Wide screen resolution Auto adjust screen size Increase font size Decrease font size Default font size default color blue color green color
位置: 首页 arrow 文章 arrow 最新文章 arrow VtigerCrm增加新用户问题
VtigerCrm增加新用户问题 打印

公司要用CRM,遂决定使用VtigerCRM。

http://www.vtiger.com/下载时新的5.04版,可以支持UTF-8编码。 按照一般步骤添加简体中文,在config.inc.php中将default_charset的值设为UTF-8。

一切看起来正常,但是在设置/用户里添加新用户,储存时跳出对话框 'SUCCESS',但是不保存。浪费无数时间,将default_charset的值设为ISO-8859-1,发现SUCCESS前有乱码,是Javascript和UTF-8编码的问题?

Smarty\templates_c\%%B5^B5B^B5BE4305%%UserEditView.tpl里

if( response.responseText == 'SUCCESS')
          {
    // $('user_status').disabled = false;
                   document.EditView.submit();
    }
           else
                   alert(response.responseText);

由于response.responseText 这个值其实是 乱码+'SUCCESS', 所以response.responseText == 'SUCCESS'永远不会成立。

考虑这行主要用来检查用户信息填写是否正确,错误信息里不会出现SUCCESS,简单处理如下:

if((response.responseText).match(/SUCCESS/ig) != null) 即可正常。

其他模块中类似问题,皆可如此处理。

 2008.04.17

 
Advertisement