Author: danydb
Date: 2011-11-24 14:15:46 +0100 (Thu, 24 Nov 2011)
New Revision: 4469

Modified:
   phpcompta/trunk/html/js/scripts.js
Log:
add get_properties to know detail of an object

Modified: phpcompta/trunk/html/js/scripts.js
===================================================================
--- phpcompta/trunk/html/js/scripts.js  2011-11-24 10:59:03 UTC (rev 4468)
+++ phpcompta/trunk/html/js/scripts.js  2011-11-24 13:15:46 UTC (rev 4469)
@@ -1080,9 +1080,8 @@
        var dossier=g('gDossier').value;
        waiting_box();
        var target="search_op";
-        
+
         var qs=obj.serialize()+"&op=search_op&ctl=search_op";
-        alert(qs);
         var action=new Ajax.Request ( 'ajax_misc.php',
         {
             method:'get',
@@ -1273,4 +1272,15 @@
                                          }
                                  }
                                );
-}
\ No newline at end of file
+}
+
+function get_properties(obj)
+{
+    var a_array=[];
+    var s_type="["+typeof obj+"]";
+    for (var m in obj)
+    {
+       a_array.push(m);
+    }
+    alert(s_type+a_array.join(","));
+}


_______________________________________________
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev

Reply via email to