You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2010/12/27 17:23:11 UTC

svn commit: r1053102 - /ofbiz/trunk/framework/images/webapp/images/getDependentDropdownValues.js

Author: jaz
Date: Mon Dec 27 16:23:11 2010
New Revision: 1053102

URL: http://svn.apache.org/viewvc?rev=1053102&view=rev
Log:
checkUomConversion expects getServiceResult to return a value (synchronous); refactored the getServiceResult method to actually run synchronous instead of asynchronous

Modified:
    ofbiz/trunk/framework/images/webapp/images/getDependentDropdownValues.js

Modified: ofbiz/trunk/framework/images/webapp/images/getDependentDropdownValues.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/getDependentDropdownValues.js?rev=1053102&r1=1053101&r2=1053102&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/getDependentDropdownValues.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/getDependentDropdownValues.js Mon Dec 27 16:23:11 2010
@@ -110,13 +110,23 @@ function getDependentDropdownValues(requ
 //*** calls any service already mounted as an event
 function getServiceResult(request, params) {
     var data;
-    jQuery.post(request, params, function(result) { data = result }, 'json' );
+    jQuery.ajax({
+    	type: 'POST',
+    	url: request,
+    	data: params,
+    	async: false,
+    	cache: false,
+    	dataType: 'json',
+    	success: function(result) {
+    		data = result;
+    	}
+    });    
     return data;
 }
 
 //*** checkUomConversion returns true if an UomConversion exists 
 function checkUomConversion(request, params) {
-    data = getServiceResult(request, params);
+    data = getServiceResult(request, params);     
     return data['exist'];
 }