#658 bug
Nitroxid

writeAttribute doesn't work properly with enctype/encoding

Reported by Nitroxid | April 22nd, 2009 @ 09:45 PM

Hi there,

I just generated a form-element and wanted to set the "enctype"-attribute to "multipart/form-data".


new Element('form',{'enctype':'multipart/form-data'});

It worked Firefox 3.0.8, IE8, Safari 4 Beta and Opera 9.64, but failed in IE6 and 7. After a litte research I found out, that the Standard JS-attribute for "enctype" is called "encoding", so I changed my code to:


new Element('form',{'encoding':'multipart/form-data'});

Then it worked in IE6 and 7, but not in the others.

So I tried to set both attributes


new Element('form',{'encoding':'multipart/form-data','enctype':'multipart/form-data'});

It works, but I was wondering if it is possible to make it work in all browsers without setting both attributes.

Or, since this is a minor issue, maybe add a note in the API-Docs of writeAttribute.

sincerely yours Andreas

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

Referenced by

Pages