web/data/cubicweb.ajax.js
branchtls-sprint
changeset 1801 672acc730ce5
parent 1563 b130c6cec8c2
child 2257 2c9eceeaae6a
--- a/web/data/cubicweb.ajax.js	Thu May 14 10:13:59 2009 +0200
+++ b/web/data/cubicweb.ajax.js	Thu May 14 10:24:56 2009 +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.
  *