[Tickets #3740] javascript for 'assign' type Horde_Form elements broken

bugs@bugs.horde.org bugs at bugs.horde.org
Thu Apr 20 10:13:39 PDT 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3740
-----------------------------------------------------------------------
 Ticket             | 3740
 Updated By         | dorm at dorm.org
 Summary            | javascript for 'assign' type Horde_Form elements broken
 Queue              | Horde Framework Packages
 Version            | HEAD
 State              | Feedback
 Priority           | 1. Low
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


dorm at dorm.org (2006-04-20 10:13) wrote:

I still get a couple JS errors with that code, mostly because of incorrect
var names.  I think this should do it:

--- form_assign.js.1.4  2006-04-20 11:10:48.419915568 -0600
+++ form_assign.js      2006-04-20 10:37:39.825227912 -0600
@@ -47,7 +47,7 @@
         }
     }
 
-    this.setField(name);
+    this.setField(form, elt);
 }
 
 Horde_Form_Assign.setField = function(form, elt)
@@ -79,5 +79,5 @@
     if (hit) {
         values = values.substring(0, values.length - 1);
     }
-    document[name + '__values'].value = values;
+    document.forms[form].elements[elt + '__values'].value = values;
 }


Also, the display of the assign field is not correctly maintained across
form submissions.  I'm not sure the __value element is correctly being
parsed into the leftValues and rightValues arrays.





More information about the bugs mailing list