![]() |
Form Enctype in Internet Explorer
I'm sure every single programmer knows that Internet Explorer has its funny little ways. Getting used to all the funny little ways is somewhat of a mammoth task - and speaking of mammoths, would take the mind the size of a mammoth to memorise them all. Here's another one to put in your collection!
javascript Code:
The above code looks so simple. We create a form ready to include into our page. Now, when I was coding Pture.com I did just that. However, as soon as I tested it in Internet Explorer for my file uploads, the uploads wouldn't work. After some investigation I realised Internet Explorer wasn't setting the enctype attribute on my dynamically created form. After some subsequent research I found out that when creating forms dynamically in Internet Explorer (both 6 and 7) using Javascript, you need to also set the encoding attribute, for some reason. So although the attribute is called enctype, setting the enctype does nothing. The following code will work: javascript Code:
Which will save you a good few hours! |
IE is a pain in the butt from all the views. :(
|
| All times are GMT. The time now is 08:24 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0