Jump to content


form uploading prob

  • Please log in to reply
1 reply to this topic

#1 cfemocha

  • Members
  • PipPip
  • Member
  • 19 posts

Posted 25 October 2006 - 05:40 PM

Im trying to write the below code using javascript
<form method="post" enctype="multipart/form-data" action="test.php">
<input type="File" name="filename" id="filename">
<input type="Submit" name="action2" value="Submit">

Below is a snipet of my javascript
var oHiddenForm = oIFrame.document.forms[0];
for (var i=0 ; i < oForm.elements.length; i++)
{   --- code ---
     oHidden.value = oForm.elements[i].value;
oHiddenForm.encoding = "multipart/form-data"; 
oHiddenForm.action = oForm.action;

all other form input values seemed to work fine, except the file that im uploading.
Im guessing oHiddenForm.encoding = "multipart/form-data";  is causing the prob, I've tried everything and
still can't figure it out.
Please help!

#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 26 October 2006 - 05:14 PM

Is this a browser-specific issue? Have you checked to see what the browser actually produces?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users