You need to sign in to do that
Don't have an account?

Open File from UNC path
Hi,
can anyone give me the solution defined below:
I created an s-control that execute on any page loading.
There is one button say 'View' on html s-control.
I want to open a file that is located on local machine by clicking the 'View' button in salesforce.
But it gives some Security error.
Can anyone tell how can i resolve this problem?
Thanks in advance
can anyone give me the solution defined below:
I created an s-control that execute on any page loading.
There is one button say 'View' on html s-control.
I want to open a file that is located on local machine by clicking the 'View' button in salesforce.
But it gives some Security error.
Can anyone tell how can i resolve this problem?
Thanks in advance
Hi,
The following is the html s-control that i executed on 'View' button clicking.
<html><head><title>New Link</title>
</head>
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/8.0/connection.js"></script>
<script language='javascript'>
var linkId = '{!Link__c.Id}';
var fileName = '{!Link__c.Name}';
var filePath = '{!Link__c.File_Path__c}';
function openFile()
{
//window.open("c:/Documents and Settings/Naresh/Desktop/DisableMcfeeMail.txt");
// window.open("file:///c:\Documents and Settings\Naresh\Desktop\DisableMcfeeMail.txt");
window.location= filePath;
}
</script>
<body>
<table class="" border="0" cellpadding="0" cellspacing="0">
<tr align='center'><td><input value=" View File" class="btn" id='Viewbtn' title="View" name="View" onclick="openFile()" type="button" ></td>
</tr>
</table>
</body></html>
When i click on the view buttton it give the following error message in the javascript error console:
Security Error: Content at https://na3.salesforce.com/servlet/servlet.Integration?lid=01N500000000eZj&eid=a0150000009FnHt&ic=1&autoMapValues=1 may not load or link to file:///C:/Documents%20and%20Settings/Naresh/Desktop/DisableMcfeeMail.txt.
Error: Access to 'file:///C:/Documents%20and%20Settings/Naresh/Desktop/DisableMcfeeMail.txt' from script denied
Source File: https://na3.salesforce.com/servlet/servlet.Integration?lid=01N500000000eZj&eid=a0150000009FnHt&ic=1&autoMapValues=1
Line: 50
can u plz help me out to resolve the problem
Thanks in advance
Message Edited by Naresh on 05-16-2007 11:33 PM
i have already tested with following options:
window.open("file:///c:/test.txt");
window.open("file://c:/test.txt");
window.location="file:///c:/test.txt";
window.location="file://c:/test.txt";
<a href="file:///c:/test.txt" target="_blank">Button</a>
<a href="file://c:/test.txt" target="">Button</a>
<a href="{!Link__c.File_Path__c}" target="_blank">Button</a>
but still its not working.
thanks
I'm trying to put an UNC path in a KB article in Salesforce for our employees. I'm not trying to use Java or anything, I'm just trying to add a URL starting with file///// but Salesforce always adds http://file///// Has anyone found a way to get around this. This is really annoying.