ASPUpload component submittion issue
Hi, there?
My hosting company allows me to use ASP Upload and I'm not even started to passing any values yet.
My question is how to submit document.form.submit() using ASPUpload.
Do I have to use input type=submit button only??
As Aspupload.com shows, I put the following code.
<form action="process.asp;" METHOD="POST" name="uploadform" ENCTYPE="multipart/form-data">
Inside of the form, I have a few text input fields and acutual file type input field to browse.
Because I have an roll-over image for "browse",
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1" style="display='none';">
<input type="text" name="text1" style="width:274;height:20;">
<a href="javascript:file_browse();"><img src="img/search.gif" name="search" width="60" height="20" border="0" align="absmiddle" id="search" onMouseOver="MM_swapImage('search','','img/searchR.gif',1)" onMouseOut="MM_swapImgRestore()"></a>
function file_browse(){
document.form.FILE1.click();
document.form.text1.value = document.artistSubmitForm.FILE1.value;
}
In order to check whether the text input fields are empty or not, I use javascript to check. I put this javascript as <a href=javascript:check();"><img src="img/submit.gif" name="submit" width="47" height="21" border="0" id="submit" onMouseOver="MM_swapImage('submit','','img/submitR.gif',1)" onMouseOut="MM_swapImgRestore()"></a>
I have to use an roll-over image instead of the input submit button.
function check(){
if(document.form.textname.value.length <1){
alert("error message");
document.form.textname.focus();
return;
}
document.form.submit();
}
However, I got an error occurs at document.form.submit();
It might sound funny but...I really want to know...Is this an error with my javascript or ASPUpload component wouldn't work with javascript I wrote?
Does any one know? Imar?
|