public
Fork of sstephenson/prototype
Description: Prototype JavaScript framework
Homepage: http://prototypejs.org/
Clone URL: git://github.com/jdalton/prototype.git
Search Repo:
Fix Element#writeAttribute('encType', 'multipart/form-data') on 
dynamically created form elements in IE.

(cherry picked from commit ecb4bca986660804a0fdef434cf4961cc807b7d8)
Tue May 06 13:16:01 -0700 2008
commit  89731f0c9b34641a9d54b8acdc2920d3c5591b9a
tree    2fe41131aef918f66154efdd7296149d97672a3e
parent  cdd8bbf7a7f8691ff740804d3f22c7243d6a7242
...
 
 
1
2
3
...
1
2
3
4
5
0
@@ -1,3 +1,5 @@
0
+* Fix Element#writeAttribute('encType', 'multipart/form-data') on dynamically created form elements in IE. (jddalton, kangax, NoiseEee)
0
+
0
 * Element#down on an input element should not raise error. (humeniuc, kangax)
0
 
0
 * Form#serializeElements should not serialize file inputs. (kangax, Lonesome Boy)
...
295
296
297
298
 
299
300
301
...
831
832
833
 
 
 
 
834
835
836
...
295
296
297
 
298
299
300
301
...
831
832
833
834
835
836
837
838
839
840
0
@@ -295,7 +295,7 @@
0
     for (var attr in attributes) {
0
       name = t.names[attr] || attr;
0
       value = attributes[attr];
0
- if (t.values[attr]) name = t.values[attr](element, value);
0
+ if (t.values[name]) name = t.values[name](element, value);
0
       if (value === false || value === null)
0
         element.removeAttribute(name);
0
       else if (value === true)
0
@@ -831,6 +831,10 @@
0
     values: {
0
       checked: function(element, value) {
0
         element.checked = !!value;
0
+ },
0
+
0
+ encType: function(element, value) {
0
+ element.getAttributeNode('encType').value = value;
0
       },
0
       
0
       style: function(element, value) {

Comments

    No one has commented yet.