[Vtigercrm-commits] [vtiger-commits] r10015 - /vtigercrm/branches/5.0.3/include/js/general.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Jan 3 08:34:45 EST 2007
Author: richie
Date: Wed Jan 3 06:34:41 2007
New Revision: 10015
Log:
duplicate account check function added
Modified:
vtigercrm/branches/5.0.3/include/js/general.js
Modified: vtigercrm/branches/5.0.3/include/js/general.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/general.js (original)
+++ vtigercrm/branches/5.0.3/include/js/general.js Wed Jan 3 06:34:41 2007
@@ -1716,6 +1716,31 @@
Calendar.setup ({
inputField : fieldid, ifFormat : dateformat, showsTime : false, button : imageid, singleClick : true, step : 1
});
+}
+
+//Added to check duplicate account creation
+
+function AjaxDuplicateValidate(module,fieldname,oform)
+{
+ var fieldvalue = getObj(fieldname).value;
+ var url = "module="+module+"&action="+module+"Ajax&file=Save&"+fieldname+"="+fieldvalue+"&dup_check=true"
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position: 'end', scope: 'command'},
+ method: 'post',
+ postBody:url,
+ onComplete: function(response) {
+ var str = response.responseText
+ if(str.indexOf('SUCCESS') > -1)
+ {
+ oform.submit();
+ }else
+ {
+ alert(str);
+ }
+ }
+ }
+ );
}
/**to get SelectContacts Popup
More information about the vtigercrm-commits
mailing list