Jump to content


This topic is now archived and is closed to further replies.


form uploading prob

Recommended Posts

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 [b]oHiddenForm.encoding = "multipart/form-data";[/b]  is causing the prob, I've tried everything and
still can't figure it out.
Please help!

Share this post

Link to post
Share on other sites
Is this a browser-specific issue? Have you checked to see what the browser actually produces?

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.