You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by bb...@apache.org on 2007/09/13 13:18:09 UTC

svn commit: r575305 - /incubator/xap/site/docs/xmodify/content/processors.html

Author: bbuffone
Date: Thu Sep 13 06:18:09 2007
New Revision: 575305

URL: http://svn.apache.org/viewvc?rev=575305&view=rev
Log:
fixed error in the page.

Modified:
    incubator/xap/site/docs/xmodify/content/processors.html

Modified: incubator/xap/site/docs/xmodify/content/processors.html
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/processors.html?rev=575305&r1=575304&r2=575305&view=diff
==============================================================================
--- incubator/xap/site/docs/xmodify/content/processors.html (original)
+++ incubator/xap/site/docs/xmodify/content/processors.html Thu Sep 13 06:18:09 2007
@@ -34,7 +34,19 @@
 		<li><a href="#prototype">Prototype Processor Information</a></li>
 		<li><a href="#mootools">Mootools Processor Information</a></li>
 	</ul>
-</p> 
+</p>
+ 
+<p><h2><span class="Title">HTML Blending</span></h2></p>
+<p>
+	xModify provides a lot of flexibility and power to dynamicaly change the HTML DOM, but can sometimes be more than is needed.  
+	HTML blending is simpler way to do modify the HTML DOM.  Each processor has a blend function that executes a request then based
+	on the "selector" and "mode" parameters will blend in the HTML returned from the request.<br><br>
+	
+	<b>"Selectors"</b> - refer to the underlying selector functionality of the library.<br>
+	<b>"Mode"</b> can be "replace", "insert-after", "insert-before", "replace-children", "append"<br><br> 
+	
+</p>
+
 
 <p>
 
@@ -84,6 +96,20 @@
 	<div style="border:1px solid #aaa;padding:10px;margin:20px;">The select attribute of the xModify operations is as defined on the following page. <br><br><a style="font-weight:bold" href="http://docs.jquery.com/Selectors" target="jQuery">Selectors Details</a>
 	<p>The operations will hand off the "select" attribute to the <b>$(select-attribute-value)</b>.</p>
 	</div>
+
+	<div><img src="../images/base.gif"><i><b>HTML Blending:</b></i></div>
+	<pre>
+    var selector = "#myDiv";
+    var mode = "append"; //append, replace, replace-children, insert-before, insert-after
+    $.blend({ 
+            url: "blend.html",
+            complete: function(results, request){
+                //function will be called after the xmodify 
+                //processing is finished
+            }
+    }, selector, mode);
+	</pre>
+
 </div>
 
 <div style="margin:20px;"><a style="font-size:20px" name="xap">xModify for XAP</a></div>
@@ -190,6 +216,21 @@
 	<p>The operations will hand off the "select" attribute to the <b>$(select-attribute-value)</b>.</p>
 	</div>
 
+	<div><img src="../images/base.gif"><i><b>HTML Blending:</b></i></div>
+	<pre>
+    var selector = "#myDiv";
+    var mode = "append"; //append, replace, replace-children, insert-before, insert-after
+    var myXhr = new XHR(
+                               {
+                                   async: true, 
+                                   method: "get",
+                                   onSuccess: function(){
+                                   }
+                                }
+                            );            
+     var result = myXhr.blend("blend.html", selector, mode);
+	</pre>
+
 </p>
 </div>
 <div style="margin:20px;"><a style="font-size:20px" name="prototype">xModify for Prototype</a></div>
@@ -235,7 +276,13 @@
 	<div style="border:1px solid #aaa;padding:10px;margin:20px;">The select attribute of the xModify operations is as defined on the following page. <br><br><a style="font-weight:bold" href="http://prototypejs.org/api/utility/dollar-dollar" target="prototype">Selectors Details</a>
 	<p>The operations will hand off the "select" attribute to the <b>$(select-attribute-value)</b>.</p>
 	</div>
-
+	
+	<div><img src="../images/base.gif"><i><b>HTML Blending:</b></i></div>
+	<pre>
+    var selector = "#myDiv";
+    var mode = "append"; //append, replace, replace-children, insert-before, insert-after
+    new Ajax.blend("blend.html", selector, mode);
+	</pre>
 </p>
 	
 </div>