1

I have created some jQuery and put it in an ascx include. It works fine on regular pages, however when I load a secured page on my site I get the following javascript error.


Permission Denied jquery.min.js Code: 0


Any ideas?

4

3 に答える 3

2

Assuming you're using the hosted jQuery by the Google CDN, you can change the hosted script address to use https instead of http:

Host -> Host Settings -> Advanced Settings -> jQuery Settings ->

Screenshot of Host Settings

References

Updated

This permissions error can occur when you're attempting to make an $.ajax() request using jQuery from a secure URL (https) to a non-secure URL (http) even though they are the same domain. Changing the url parameter to use a relative URL should fix the issue.

于 2010-04-25T17:50:59.453 に答える
0

jQuery minファイルをどのように参照していますか?ライブラリへの完全修飾URLを使用していて、そのURLがHTTPSではなくHTTPを指定している場合、これにより、説明したエラーが発生します。

例えば:

<script type="text/javascript" src="http://www.example.com/scripts/jquery.min.js"></script>

サイトがHTTPSで提供されている場合、これによりエラーが発生します。

于 2010-04-25T17:26:47.760 に答える
0

私の経験では、「Permission Denied」エラーは、自分とは異なるドメインにあるウィンドウにアクセスしようとしたことが原因です。リストしたコードではctl、ポップアップウィンドウへの参照ですか、それともコードが実行されているウィンドウ以外のウィンドウへの参照ですか?そのウィンドウがhttp://mysite.comにあり、スクリプトがhttps://mysite.comで実行されている場合、PermissionDeniedエラーが発生します。

于 2010-04-26T13:12:51.397 に答える