web/data/cubicweb.ajax.js
branchtls-sprint
changeset 12560 dc6d44e69a70
parent 1801 672acc730ce5
child 2257 2c9eceeaae6a
--- a/web/data/cubicweb.ajax.js	Wed Jun 03 09:09:33 2009 +0200
+++ b/web/data/cubicweb.ajax.js	Thu Apr 04 13:49:34 2019 +0200
@@ -317,6 +317,18 @@
     }
 }
 
+/*
+ * fetches `url` and replaces `nodeid`'s content with the result
+ * @param replacemode how the replacement should be done (default is 'replace')
+ *  Possible values are :
+ *    - 'replace' to replace the node's content with the generated HTML
+ *    - 'swap' to replace the node itself with the generated HTML
+ *    - 'append' to append the generated HTML to the node's content
+ */
+function loadxhtml(nodeid, url, /* ... */ replacemode) {
+    jQuery('#' + nodeid).loadxhtml(url, null, 'post', replacemode);
+}
+
 /* XXX: this function should go in edition.js but as for now, htmlReplace
  * references it.
  *