cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r265516 - /cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/js/cforms.js
Date Wed, 31 Aug 2005 15:57:54 GMT
Author: sylvain
Date: Wed Aug 31 08:57:50 2005
New Revision: 265516

URL: http://svn.apache.org/viewcvs?rev=265516&view=rev
Log:
Enable Ajax in the portal

Modified:
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/js/cforms.js

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/js/cforms.js
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/js/cforms.js?rev=265516&r1=265515&r2=265516&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/js/cforms.js (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/js/cforms.js Wed Aug
31 08:57:50 2005
@@ -50,7 +50,11 @@
         
         var req = CForms.newXMLHttpRequest();
         if (req) {
-            var uri = form.action;
+	    // The "ajax-action" attribute specifies an alternate submit location used in Ajax mode.
+	    // This allows to use Ajax in the portal where forms are normally posted to the portal
URL.
+	    var uri = form.getAttribute("ajax-action");
+	    if (! uri)
+	        uri = form.action;
             if ( uri == "" )
                 uri = document.location;
                 



Mime
View raw message