[Vtigercrm-commits] [vtiger-commits] r6908 - /vtigercrm/trunk/Smarty/templates/CreateProfile.tpl

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 7 02:00:39 EDT 2006


Author: saraj
Date: Wed Jun  7 00:00:35 2006
New Revision: 6908

Log:
ajax functionality has been modified

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

Modified: vtigercrm/trunk/Smarty/templates/CreateProfile.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/CreateProfile.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/CreateProfile.tpl Wed Jun  7 00:00:35 2006
@@ -93,16 +93,18 @@
 
 function dup_validation(profilename)
 {ldelim}
-        var ajaxObj = new VtigerAjax(ajaxSaveResponse);
-        var urlstring ="module=Users&action=UsersAjax&file=CreateProfile1&ajax=true&dup_check=true&profile_name="+profilename;
-
-        ajaxObj.process("index.php?",urlstring);
-{rdelim}
-function ajaxSaveResponse(response)
-{ldelim}
-        if(response.responseText == 'SUCESS')
-                document.profileform.submit();
-        else
-                alert(response.responseText);
+	new Ajax.Request(
+		'index.php',
+		{ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
+			method: 'post',
+			postBody: 'module=Users&action=UsersAjax&file=CreateProfile1&ajax=true&dup_check=true&profile_name='+profilename,
+			onComplete: function(response) {ldelim}
+					if(response.responseText == 'SUCESS')
+						document.profileform.submit();
+					else
+						alert(response.responseText);
+				{rdelim}
+		{rdelim}
+	);
 {rdelim}
 </script>





More information about the vtigercrm-commits mailing list