[Vtigercrm-commits] [vtiger-commits] r6922 - /vtigercrm/trunk/Smarty/templates/UserEditView.tpl

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 7 05:21:27 EDT 2006


Author: saraj
Date: Wed Jun  7 03:21:24 2006
New Revision: 6922

Log:
ajax functionality has been modified

Modified:
    vtigercrm/trunk/Smarty/templates/UserEditView.tpl

Modified: vtigercrm/trunk/Smarty/templates/UserEditView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/UserEditView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/UserEditView.tpl Wed Jun  7 03:21:24 2006
@@ -31,22 +31,23 @@
 <script language="javascript">
 function check_duplicate()
 {ldelim}
-
-        var ajaxObj = new VtigerAjax(ajaxSaveUserResponse);
-        var user_name = document.getElementById('user_name').value;
-
-        var urlstring ="module=Users&action=UsersAjax&file=Save&ajax=true&dup_check=true&userName="+user_name;
-        ajaxObj.process("index.php?",urlstring);
+	var user_name = $('user_name').value;
+	new Ajax.Request(
+                'index.php',
+                {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
+                        method: 'post',
+                        postBody: 'module=Users&action=UsersAjax&file=Save&ajax=true&dup_check=true&userName='+user_name,
+                        onComplete: function(response) {ldelim}
+				if(response.responseText == 'SUCCESS')
+			                document.EditView.submit();
+       				else
+			                alert(response.responseText);
+                        {rdelim}
+                {rdelim}
+        );
 
 {rdelim}
 
-function ajaxSaveUserResponse(response)
-{ldelim}
-        if(response.responseText == 'SUCCESS')
-                document.EditView.submit();
-        else
-                alert(response.responseText);
-{rdelim}
 </script>
 
 





More information about the vtigercrm-commits mailing list