文件上传没反映 高手看看啊
下面这是一个上传文件的全部页面 在别人的机子上运行是好的 怎么我这就不行了呢 点上传的时候没反映呢
点浏览的时候可以浏览到文件 但是上传的时候没反映 没有错误 就是没反映 郁闷的很啊
请高手指教下啊 我看的代码是没有错误的啊 是哪个地方出问题了
a.asp页面function selectfile()
{
var f1 = document.form1;
var LM = f1.LM.value;
if( LM =="")
{
alert("\ 必须先选择项目所属类别!");
return false;
}
var str = 'history_uploadui.asp?LM='+ LM;
var sreturn=showModalDialog(str,window,'dialogWidth:360px;dialogHeight:160px;help:no;scroll:no;status:no');
if(sreturn)
{
sreturn = LM + '\\' + sreturn;
document.all["items"].value= sreturn;
}
}
<tr>
<td width="30%" height="25" class="forumrow"><b>上传项目:</b></td>
<td width="70%" class="forumrow">
<input name="items" size="65" >
<input type="button" name="Submit" value="上传" onClick="selectfile();"></td>
</tr>
history_uploadui.asp页面<form action="history_upload.asp?LM=<%=request("LM")%>" method=post name=myform >
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=55 align=right >本地:</td>
<td width="300"> <input type=file name="FILE1" style="width:100%"> </td>
</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
<tr>
<td width=55 align=right ></td>
<td> <input type=submit value=' 上传 '/> <input type=button value=' 取消 ' onClick="window.close();"> </td>
</tr>
</table>
</form >
history_upload.asp
<%
LM = request("LM")
Set Upload = Server.CreateObject("Persits.Upload")
Upload.Save
Set File = Upload.Files("FILE1")
If File Is Nothing Then
Response.Write "<script> parent.callback('-1')</script>"
Else
FilePath = "D:\root\history\" & LM & "\" & File.Filename
If Upload.FileExists( FilePath ) Then
Response.Write "<script> parent.callback('-2')</script>"
Else
File.SaveAs FilePath
Response.Write "<script> parent.callback('"& File.Filename &" ')</script>"
End if
End If
%>