开发者

Javascript "SCRIPT5: Access is denied" opening PDF from script

开发者 https://www.devze.com 2023-04-08 10:38 出处:网络
I\'ve read many other posted questions on SO and so far have found nothing to help me solve my problem.

I've read many other posted questions on SO and so far have found nothing to help me solve my problem.

We have a web form that runs on our LAN opening up PDF files in Javascript using the OPEN function.

For the longest time there have been no problems.

Today two of the four users reported that the form was not opening the PDF file anymore.

The other two users are not experiencing any problems.

I now get the same problem on my work machine and home machines (through the VPN), both win7 64 boxes, when trying to use the same web form. The users with the problem have a winXP box and a win7 pro box respectively.

The users with no issues have winXP boxes, for whatever this OS information is worth.

The following Javascript returns SCRIPT5: Access is denied. in IE9 and Access is denied opening file from script in Firefox o开发者_JAVA技巧r Chrome.

var path = 'file://server1//Temp/file.pdf';

var newWin;

if(path != '') {
    newWin = open(path,'pdf');
}

I'm at my wits end. What is going on here?? I have frustrated users waiting in the morning, any help?? =)


Solution for IE:

On client IE browser do next:

  1. in IE open Internet Options dialog

  2. Go to Security Tab

  3. Select Local intranet icon and click on Sites button. In IE9 click Advanced button.

  4. Add into list address of web-server from you load a page with code in Question (example: http://intranetHttpServer).

0

精彩评论

暂无评论...
验证码 换一张
取 消