3种可能:
1.在运行里面执行regsvr32 scrrun.dll,如果不行,继续;
2.安装msxml3.dll,再不行,还继续
3.在internet选项里"安全"选项卡中涉及到activex的都启用,安全级别设置为 中.再不行,我也没招了.
1.在运行里面执行regsvr32 scrrun.dll,如果不行,继续;
2.安装msxml3.dll,再不行,还继续
3.在internet选项里"安全"选项卡中涉及到activex的都启用,安全级别设置为 中.再不行,我也没招了.
解决方案 »
- jquery ui draggable 不能作用于表单元素吗???
- 后台拼写页面 jqery+ajax提交数据
- 这个地方不清楚,求解答。
- 以下代码在firefox中报错无法正常运行(对象数组)
- jqgrid 分页
- 这里的值nowface.src 如何在本页显示出来,是图片,在线等
- 急急急急急急!!!怎么样检测一个checkboxlist 所有被选择checkbox ?(在线等待)
- 急救?在线等!
- 如何用javascript实现编辑按钮的功能?100分
- 为什么用window.open打开的窗口,再用window.opener.document.forms[0].submit回去,其中参数传不成功
- 关于【meizz】【梅花雪】大师的树的动态加载(php)
- 问个firefox中的js问题
<input type=button value=另存为 onclick="document.execCommand('Saveas',false,'c:\\test.htm')" />
我还需要通知用户选择保存文件路径和文件名
------------
试过,失败^_^2.安装msxml3.dll,再不行,还继续
------------
安装就有3.在internet选项里"安全"选项卡中涉及到activex的都启用,安全级别设置为 中.再不行,我也没招了.
------------
安全级别:低,所有都许可了
==========================================================
另外大家知道“Automation server can't create object”错误的原因有哪些么?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>shawl.qiu template</title>
</head>
<body>
<%
Download("id", "file", "/upload/", false);
function Download(QueryId, FilePath, pathForCheck, Debug)
{
var Debug = false;
var QueryId = Request.QueryString(QueryId)+"";
var FilePath = Request.QueryString(FilePath)+"";
if(Debug)
{
Response.Write("<li/>typeof(QueryId): "+typeof(QueryId));
Response.Write("<li/>QueryId: "+QueryId);
Response.Write("<li/>QueryId==\"\": "+(QueryId==""));
Response.Write("<li/>QueryId==\"undefined\": "+(QueryId=="undefined"));
Response.Write("<hr/>");
Response.Write("<li/>typeof(FilePath): "+typeof(FilePath));
Response.Write("<li/>FilePath: "+FilePath);
Response.Write("<li/>FilePath==\"\": "+(FilePath==""));
Response.Write("<li/>FilePath==\"undefined\": "+(FilePath=="undefined"));
Response.Write("<hr/>");
}
if(QueryId=="undefined"||FilePath=="undefined")Response.End();
switch(QueryId)
{
case "download":
if(Debug)
{
Response.Write("<li/>download: ");
Response.Write("<hr/>");
}
if(!CheckPathIn(FilePath, pathForCheck, true, Debug))Response.End();
DownloadFile(FilePath, true);
break;
}
function CheckPathIn(path, pathForCheck, bCovPath, Debug)
{
if(bCovPath)
{
path=Server.MapPath(path);
pathForCheck=Server.MapPath(pathForCheck);
} // end if
if(Debug)
{
Response.Write("<li/>path: "+path);
Response.Write("<li/>pathForCheck: "+pathForCheck);
}
if(path.indexOf(pathForCheck)<0)return false;
return true;
}
function DownloadFile(sFilePath, bCovPath, Debug)
{
if(sFilePath=="")return;
if(bCovPath)sFilePath=Server.MapPath(sFilePath);
if(Debug)
{
Response.Write("<li/>download debug:");
Response.Write("<li/>sFilePath: "+sFilePath);
Response.End();
}
if(!fFlCkFl(sFilePath))return;
var fileName = sFilePath.replace(/.*\\/,"");
Response.Clear();
Response.ContentType="application/octet-stream";
Response.AddHeader("Content-Disposition","attachment;filename="+fileName);
Response.BinaryWrite(fReadBinaryFromFile(sFilePath));
Response.Flush();
Response.End();
function fFlCkFl(sPath){
return new ActiveXObject("scripting.fileSystemObject").FileExists(sPath);
}
function fReadBinaryFromFile(sPath, sCharset){
var o=new ActiveXObject('adodb.stream')
with(o){
Type=1;
Mode=3;
Open();
LoadFromFile(sPath);
var pNum=0
if(typeof sCharset!='undefined'&&sCharset!=''){
CharSet=sCharset;
if(sCharset=='utf-8'||sCharset=='unicode')pNum=2;
}
Position=pNum;
var $str=Read();
close();
}
o=null;
return $str;
} // end function fReadBinaryFromFile(sPath, sCharset) // shawl.qiu code
} // end function DownloadFile // shawl.qiu code
} // end function Download
%>
</body>
</html>