使用 javascript (CRM 4.0) 在 IE 上打开文件夹?
我想在 IE window.i 上查看我的特定文件夹。我使用 window.open();然后我收到错误“访问被拒绝”。我授予“每个人”对此文件夹的权限并共享它。
var oShell = new ActiveXObject("Scripting.FileSystemObject");
var Path="C:\\test\\"+crmForm.ObjectId;
if (! oShell.FolderExists(Path) )
{
oShell.CreateFolder(Path)
}
crmForm.all.new_paylasim.DataValue=Path;
var urlField =crmForm.all.new_paylasim;
urlField.style.color = 0x0000ff;
urlField.style.textDecorationUnderline = true;
urlField.style.cursor = "hand";
urlField.ondblclick = function() {
var url = urlField.DataValue; // Or get it from somewhere else
if (url != null && url.length > 0) {
window.open(url);
}
}
有什么解决办法呢?
I want to see my specific folder on IE window.i use window.open(); and then i get an error "Access denied".I gave "everyone" permission on this folder and share it.
var oShell = new ActiveXObject("Scripting.FileSystemObject");
var Path="C:\\test\\"+crmForm.ObjectId;
if (! oShell.FolderExists(Path) )
{
oShell.CreateFolder(Path)
}
crmForm.all.new_paylasim.DataValue=Path;
var urlField =crmForm.all.new_paylasim;
urlField.style.color = 0x0000ff;
urlField.style.textDecorationUnderline = true;
urlField.style.cursor = "hand";
urlField.ondblclick = function() {
var url = urlField.DataValue; // Or get it from somewhere else
if (url != null && url.length > 0) {
window.open(url);
}
}
What's solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须面对
file:///C:/myfile.txt
(不再起作用)或file://server/share
。请参阅 http://blogs .msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx为您要打开的文件夹创建网络共享。
You have to problems
file:///C:/myfile.txt
(which doesn't work anymore) orfile://server/share
for a network share. See http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspxCreate a network share for the folder you would like to open.