thanks for your response Laurent.
then maybe this is my problem? i have a client - client_upload.aspx
that has all the javascript and the HTML. but, i have a function call
that sends the url string through
a hidden iframe to the server page (server_upload.aspx). the form tag
on the client has an action of action="server_upload.aspx" inaddition
to the enctype=multipart/form-data. the response from
server_upload.aspx is sent back to client_upload.aspx.
so, that is why i was wondering if both forms need the multipart
enctype. should i be doing everything on the same aspx page - client
and server processing? this seems to disgree with what i have read
online.
FYI - here is the the onsubmit function of the client_upload.aspx form.
function callToServer(theFormName) {
if (!document.createElement) {
return true
};
var IFrameDoc;
var URL = 'server_upload.aspx' + buildQueryString(theFormName);
if (!IFrameObj && document.createElement) { //1
// create the IFrame and assign a reference to the
// object to our global variable IFrameObj.
// this will only happen the first time
// callToServer() is called
try { //2
var tempIFrame=document.createElement('iframe');
tempIFrame.setAttribute('id','RSIFrame');
tempIFrame.style.border='0px';
tempIFrame.style.width='0px';
tempIFrame.style.height='0px';
IFrameObj = document.body.appendChild(tempIFrame);
if (document.frames) { //3
// this is for IE5 Mac, because it will only
// allow access to the document object
// of the IFrame if we access it through
// the document.frames array
IFrameObj = document.frames['RSIFrame'];
} // end 3
} // end 2
catch(exception) { // 3
// This is for IE5 PC, which does not allow dynamic creation
// and manipulation of an iframe object. Instead, we'll fake
// it up by creating our own objects.
iframeHTML='\<iframe id="RSIFrame" style="';
iframeHTML+='border:0px;';
iframeHTML+='width:0px;';
iframeHTML+='height:0px;';
iframeHTML+='"><\/iframe>';
document.body.innerHTML+=iframeHTML;
IFrameObj = new Object();
IFrameObj.document = new Object();
IFrameObj.document.location = new Object();
IFrameObj.document.location.iframe =
document.getElementById('RSIFrame');
IFrameObj.document.location.replace = function(location) { //4
this.iframe.src = location;
} // end 4
} // end 3
} // end 2
Laurent said:
Hi,
pbd22 wrote:
hi.
could somebody tell me, when uploading a file, i know the form where
the upload component is must
have enctype=multipart/form-data but, is the same true for the form
with the server code to handle the upload?
thanks.
I don't understand what you mean. There is one form only, it's on the
ASPX page, get sent to the client, and then the same form get sent back
to the server.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch