Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting 'Access Denied' Error when i am trying to open pdf file using javascript open window.

I have mentioned the path already. But, the pdf page is not coming and also getting 'Access Denied' Error.

see code and path
------------------
JavaScript
function openwindow(url,title)
   {
   var MovWin = window.open(url, 'Newwindow','fullscreen=no,location=no,directories=no,toolbar=no,menubar=no,left=0,top=0,height=700,width=1020,scrollbars=yes,resizable=yes');
   MovWin.document.title = title;
   }


<tr>
       <td width="50%" valign="top" align="left">     2.1 
       <a style="text-decoration: none; color: #000080;" title="text" href="java<!-- no -->script: void(0)">
	onmouseover="this.style.fontWeight='bold'" onmouseout="this.style.fontWeight='normal'" 
	 önclick="javascript:openwindow('C:\\ABA\ABC1\Pro\APPLICATION\USA\Documents\GENERAL EMPLIST.pdf','New Window')">Policy</a></td>
		                    
</tr>
Posted
Updated 16-May-12 23:18pm
v2

1 solution

use the url this way!!!!!
var url="C:/\Documents and Settings/\sanjeev.a/\Desktop/\practicingApp/\Visual-Studio-vNext-Preview-Web[1].pdf";
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900