admin管理员组

文章数量:1430093

<script type="text/javascript" src=".js/0.9.0/dropbox.min.js"></script>

Hi am using above file to access dropbox functions. It contain all the dropbox functions. i included this one to my application and i used the below code to upload a file to dropbox using writefile function.
This was working fine in chrome and Mozilla browser but in IE its getting an error.
The error is: "Microsoft JScript runtime error: Access is denied".
Please anyone help me how to resolve thid IE Error and tell me the reason why this error ing only for IE Browser?

 var UploadToDropbox = new Dropbox.Client({ key: consumerKey, secret: consumerSecret, token: accessToken, tokenSecret: accessTokenSecret, dropbox: true });
            UploadToDropbox.authenticate(function (error, UploadToDropbox) {
                if (error) {
                    alert('Something wrong here.');
                }
                else {
                    UploadToDropbox.writeFile("HelloWorld.txt", "Hello, world!\n", function (error, stat) {
                        if (error) {
                            return showError(error);  // Something went wrong.
                        }
                        alert("File saved to your dropbox successfully. ");
                    });

                }
            });

Hi thank you for your reply my question and i tried like that but still that same error ing.

Ok now what should i do for resolve this error.

and i tried with this also

<script type="text/javascript">
        // Hack to make dropbox.js works in IE8, IE9.
        if (!window.btoa) window.btoa = base64.encode; 
        if (!window.atob) window.atob = base64.decode;
    </script>

but same error.

<script type="text/javascript" src="https://cdnjs.cloudflare./ajax/libs/dropbox.js/0.9.0/dropbox.min.js"></script>

Hi am using above file to access dropbox functions. It contain all the dropbox functions. i included this one to my application and i used the below code to upload a file to dropbox using writefile function.
This was working fine in chrome and Mozilla browser but in IE its getting an error.
The error is: "Microsoft JScript runtime error: Access is denied".
Please anyone help me how to resolve thid IE Error and tell me the reason why this error ing only for IE Browser?

 var UploadToDropbox = new Dropbox.Client({ key: consumerKey, secret: consumerSecret, token: accessToken, tokenSecret: accessTokenSecret, dropbox: true });
            UploadToDropbox.authenticate(function (error, UploadToDropbox) {
                if (error) {
                    alert('Something wrong here.');
                }
                else {
                    UploadToDropbox.writeFile("HelloWorld.txt", "Hello, world!\n", function (error, stat) {
                        if (error) {
                            return showError(error);  // Something went wrong.
                        }
                        alert("File saved to your dropbox successfully. ");
                    });

                }
            });

Hi thank you for your reply my question and i tried like that but still that same error ing.

Ok now what should i do for resolve this error.

and i tried with this also

<script type="text/javascript">
        // Hack to make dropbox.js works in IE8, IE9.
        if (!window.btoa) window.btoa = base64.encode; 
        if (!window.atob) window.atob = base64.decode;
    </script>

but same error.

Share Improve this question edited Feb 7, 2013 at 11:22 user1969032 asked Feb 7, 2013 at 11:00 user1969032user1969032 11 gold badge1 silver badge3 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 1

Open IE->Tools-->InternetOptions

In Security Tab->select Zone as Internet-->Click Custom Level Button---> Check "Enable" in Access data source across Domains under Miscellaneous.

It seems that IE does not play well with javascript events that trigger a DOM control. So try to remove such event actions , if they are present .

Usually means that you are attempting to update a property or access content that is not permitted under your current security settings.

Sometimes, it also happens due to usage of deprecated method .

The hack in your question is not necessary. dropbox.js packages its own implementation of atob / btoa, which is used on IE <= 9. You can try it out by accessing Dropbox.Util.atob and Dropbox.Util.atob in the IE Developer Tools console.

base64 code: https://github./dropbox/dropbox-js/blob/master/src/base64.coffee

First, please run the checkbox.js sample code to check your IE settings. If the sample works (you can log in, add tasks, mark them as done and remove them) then your IE settings are OK, and the problem is elsewhere.

checkbox.js: https://dl-web.dropbox./spa/pjlfdak1tmznswp/checkbox.js/public/index.html

Second, make sure that you're serving your HTML page using https://. The Dropbox API server uses https, and IE <= 9 doesn't allow cross-domain requests from http pages to https servers.

Third, you shouldn't need the token and tokenSecret parameters in the authorize call.

If you still get the JScript runtime error, can you please point to the line of code that causes it? Also, consider opening an issue on the dropbox.js GitHub page. This will get faster responses.

本文标签: javascriptMicrosoft JScript runtime error Access is denied Dropboxjs in IEStack Overflow