Subversion Repositories SmartDukaan

Rev

Rev 23494 | Rev 23629 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23494 Rev 23500
Line 42... Line 42...
42
	      callback_function(response);
42
	      callback_function(response);
43
	   }
43
	   }
44
	});
44
	});
45
}
45
}
46
 
46
 
-
 
47
function doGetAjaxRequestWithParamsHandler(urlString, params, callback_function){
-
 
48
	doAjaxRequestWithParamsHandler(urlString, "GET", params, callback_function);
-
 
49
}
-
 
50
 
-
 
51
function doPostAjaxRequestWithParamsHandler(urlString, params, callback_function){
-
 
52
	doAjaxRequestWithParamsHandler(urlString, "POST", params, callback_function);
-
 
53
}
-
 
54
 
47
function doAjaxRequestWithJsonHandler(urlString, httpType, json, callback_function){
55
function doAjaxRequestWithJsonHandler(urlString, httpType, json, callback_function){
48
	$.ajax({
56
	$.ajax({
49
	   url: urlString,
57
	   url: urlString,
50
	   async: true,
58
	   async: true,
51
	   cache: false,
59
	   cache: false,
Line 58... Line 66...
58
	      callback_function(response);
66
	      callback_function(response);
59
	   }
67
	   }
60
	});
68
	});
61
}
69
}
62
 
70
 
-
 
71
function doPostAjaxRequestWithJsonHandler(urlString, json, callback_function){
-
 
72
	doAjaxRequestWithJsonHandler(urlString, "POST", json, callback_function);
-
 
73
}
-
 
74
 
-
 
75
function doPutAjaxRequestWithJsonHandler(urlString, json, callback_function){
-
 
76
	doAjaxRequestWithJsonHandler(urlString, "PUT", json, callback_function);
-
 
77
}
63
 
78
 
64
function doAjaxRequestHandler(urlString, httpType, callback_function){
79
function doAjaxRequestHandler(urlString, httpType, callback_function){
65
	$.ajax({
80
	$.ajax({
66
	   url: urlString,
81
	   url: urlString,
67
	   async: true,
82
	   async: true,
Line 72... Line 87...
72
	      callback_function(response);
87
	      callback_function(response);
73
	   }
88
	   }
74
	});
89
	});
75
}
90
}
76
 
91
 
-
 
92
function doGetAjaxRequestHandler(urlString, callback_function){
-
 
93
	doAjaxRequestHandler(urlString, "GET", callback_function);
-
 
94
}
-
 
95
 
-
 
96
function doPutAjaxRequestHandler(urlString, callback_function){
-
 
97
	doAjaxRequestHandler(urlString, "PUT", callback_function);
-
 
98
}
-
 
99
 
77
function doAjaxUploadRequest(urlString, httpType, file){
100
function doAjaxUploadRequest(urlString, httpType, file){
78
	var response;
101
	var response;
79
	doAjaxUploadRequestHandler(urlString, httpType, file, function(ajaxResponse){
102
	doAjaxUploadRequestHandler(urlString, httpType, file, function(ajaxResponse){
80
		response = ajaxResponse;
103
		response = ajaxResponse;
81
	});
104
	});