- From: <rick.myers@verizon.com>
- Date: Wed, 19 Jul 2000 16:03:08 -0400 (EDT)
- To: <www-html@w3.org>
Hello, Is the <form> tag property ENCTYPE a modifiable variable (via scripts)? Situation: A form with a default 'ENCTYPE="multipart/form-data"' will go to one CGI if a file is specified to upload, or it will go to another CGI if no file is specified. The problem is that the first CGI accepts multipart data, whereas the second cgi accepts only 'application/x-www-urlencoded' data. Therefore we were trying to swap the ENCTYPE of the form using JavaScript, however, nothing we did changed it. It appeared that it takes only what is specified in the form tag, and disregards any attempt to change that value dynamically. Is this the normal function of the <form> tag? Is ENCTYPE a non-modifiable variable field (in which case I should refer to it as a 'fixed-field')? I don't think this is a JavaScript question. I know you can change the action and target of a form, and that ENCTYPE wasn't specifically mentioned as a property you can change (at least not in the book I was using for reference). The only other thing I can think of is that the JS syntax is incorrect. Below is what we were using: document.npaForm.action="/cgi-bin/flupload.cgi"; document.npaForm.enctype="multipart/form-data"; Any insight on the behaviour of ENCTYPE would be appreciated. Thanks. ~Rick
Received on Thursday, 20 July 2000 11:26:59 UTC