[Mapbender-commits] r1320 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon May 14 08:12:53 EDT 2007


Author: christoph
Date: 2007-05-14 08:12:53 -0400 (Mon, 14 May 2007)
New Revision: 1320

Modified:
   trunk/mapbender/http/javascripts/map.php
Log:
added comments for ajax functions

Modified: trunk/mapbender/http/javascripts/map.php
===================================================================
--- trunk/mapbender/http/javascripts/map.php	2007-05-14 11:35:56 UTC (rev 1319)
+++ trunk/mapbender/http/javascripts/map.php	2007-05-14 12:12:53 UTC (rev 1320)
@@ -1354,7 +1354,13 @@
  *   AJAX wrapper functions
  ***************************************************************************************
  */
-
+/**
+ * A wrapper for an AJAX request via GET 
+ *
+ * @param {String} url the URL of a (presumably a server side) script.
+ * @param {Object} An object containing parameters, f.e. {name1:value1, name2:value2}
+ * @param {Function} A function that is called when the server side script has been processed. The function is called with two parameters, result and status. Result is the output of the server side script (XML, HTML, whatever), status is a {String}, either "success" or "error". 
+ */
 function mb_ajax_get(url, param, callback) {
 	try {
 		mb_ajaxWrap_get(url, param, callback);
@@ -1364,6 +1370,13 @@
 	}
 }	
 
+/**
+ * A wrapper for an AJAX request via POST 
+ *
+ * @param {String} url the URL of a (presumably a server side) script.
+ * @param {Object} An object containing parameters, f.e. {name1:value1, name2:value2}
+ * @param {Function} A function that is called when the server side script has been processed. The function is called with two parameters, result and status. Result is the output of the server side script (XML, HTML, whatever), status is a {String}, either "success" or "error". 
+ */
 function mb_ajax_post(url, param, callback) {
 	try {
 		mb_ajaxWrap_post(url, param, callback);
@@ -1373,6 +1386,13 @@
 	}
 }	
 	
+/**
+ * A wrapper for an AJAX request via GET 
+ *
+ * @param {String} url the URL of a (presumably a server side) script.
+ * @param {Object} An object containing parameters, f.e. {name1:value1, name2:value2}
+ * @param {Function} A function that is called when the server side script has been processed. The function is called with two parameters, result and status. Result is the output of the server side script (a JavaScript Object, not a String!), status is a {String}, either "success" or "error". 
+ */
 function mb_ajax_json(url, param, callback) {
 	try {
 		mb_ajaxWrap_json(url, param, callback);



More information about the Mapbender_commits mailing list