cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Picker error on Internet Explorer 11 when invoked during page load

Picker error on Internet Explorer 11 when invoked during page load

rrpai
Helpful | Level 5

- i am loading file picker when a html page loads

- on Firefox, Chrome, Microsoft Edge  browsers it works fine

- On IE-11 it gives error.

error in console
> SCRIPT5022: Failed to open/load the window. Dropbox.choose and Dropbox.save should only be called from within a user-triggered event handler such as a tap or click event.
jquery.min.js (2,31689)

In picker
> Could not communicate with https://host:port/

- after that picker doesnt work.

- pls comment. Also pls comment why behaviour is different in browsers and issue is only with IE-11

http://localhost:8000/DropboxPicker.html

// simplified test
function loadPicker()
{
    let options = {
        success: printSelectedFile,
        linkType: "direct",
        multiselect: true
    };
    Dropbox.choose(options);
}
function printSelectedFile()
{
  ..
}
// load picker $(document).ready(loadPicker);
1 Accepted Solution

Accepted Solutions

Re: Picker error on Internet Explorer 11 when invoked during page load

Greg-DB
Dropboxer

Every browser is implemented differently, so different behaviors may be expected across browsers. (For what it's worth though, I do see the same error here using your code in Chrome on macOS as well.)

In any case, you should only start the Chooser from a user-triggered event. E.g., call Dropbox.choose when a button is hit; something like:

    $(document).ready(function() {
        $("#button").on('click', function(e) {
            Dropbox.choose(options);
        });
    });

View solution in original post

1 Reply 1

Re: Picker error on Internet Explorer 11 when invoked during page load

Greg-DB
Dropboxer

Every browser is implemented differently, so different behaviors may be expected across browsers. (For what it's worth though, I do see the same error here using your code in Chrome on macOS as well.)

In any case, you should only start the Chooser from a user-triggered event. E.g., call Dropbox.choose when a button is hit; something like:

    $(document).ready(function() {
        $("#button").on('click', function(e) {
            Dropbox.choose(options);
        });
    });

View solution in original post

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?