<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Triggering the Embedder using JavaScript in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/454181#M23459</link>
    <description>&lt;P&gt;Thanks! Yes, you'll also need to define "element" which will depend on your page, but should be the element on your page where you want to put the Embedder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if you have an element on your page like this:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;div&amp;nbsp;id="folder_container"&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you might define 'element' like this:&lt;/P&gt;
&lt;PRE&gt;var element = document.getElementById("folder_container");&lt;/PRE&gt;</description>
    <pubDate>Thu, 17 Sep 2020 17:14:38 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-09-17T17:14:38Z</dc:date>
    <item>
      <title>Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/453854#M23448</link>
      <description>&lt;PRE&gt;var options = {
      // Shared link to Dropbox file
      link: "https://www.dropbox.com/sh/keptcjl08q3wsid/AACui966iXcXPbagCJ2py2L-a?dl=0",
      file: {
        // Sets the zoom mode for embedded files. Defaults to 'best'.
        zoom: "best" // or "fit"
      },
      folder: {
        // Sets the view mode for embedded folders. Defaults to 'list'.
        view: "list" // or "grid"
        headerSize: "normal" // or "small"
      }
    }
    Dropbox.embed(options, element);&lt;/PRE&gt;
&lt;P&gt;In addition to the above code and the embed code snippet is there anything else I need to get the dropbox embedder to work? Embedding via anchor links works, but I can't trigger it using the javascript code above in order to customize it a bit.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2020 20:58:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/453854#M23448</guid>
      <dc:creator>IceManLoneWolf</dc:creator>
      <dc:date>2020-09-21T20:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/454165#M23454</link>
      <description>&lt;P&gt;What error, if any, do you get in the JavaScript Console when you try this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I can see, it looks like it may just be a syntax error. You're missing a comma here:&lt;/P&gt;
&lt;PRE&gt;// view: "list" // or "grid"&lt;/PRE&gt;
&lt;P&gt;It should be:&lt;/P&gt;
&lt;PRE&gt;view: "list", // or "grid"&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Sep 2020 16:36:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/454165#M23454</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-09-17T16:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/454180#M23458</link>
      <description>&lt;P&gt;Thanks for responding. I get the following error in console.&lt;/P&gt;&lt;P&gt;Uncaught ReferenceError: element is not defined&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 17:10:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/454180#M23458</guid>
      <dc:creator>IceManLoneWolf</dc:creator>
      <dc:date>2020-09-17T17:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/454181#M23459</link>
      <description>&lt;P&gt;Thanks! Yes, you'll also need to define "element" which will depend on your page, but should be the element on your page where you want to put the Embedder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if you have an element on your page like this:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;div&amp;nbsp;id="folder_container"&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you might define 'element' like this:&lt;/P&gt;
&lt;PRE&gt;var element = document.getElementById("folder_container");&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Sep 2020 17:14:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/454181#M23459</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-09-17T17:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/454193#M23460</link>
      <description>&lt;P&gt;Thanks. That did the trick.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 17:37:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/454193#M23460</guid>
      <dc:creator>IceManLoneWolf</dc:creator>
      <dc:date>2020-09-17T17:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/631821#M29171</link>
      <description>&lt;P&gt;Do you have an example of the full code? I am still having the same issue.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 05:38:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/631821#M29171</guid>
      <dc:creator>Bryantsssss</dc:creator>
      <dc:date>2022-10-26T05:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/631925#M29174</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1585594"&gt;@Bryantsssss&lt;/a&gt; Exactly how the code should look will depend on your scenario and what you're trying to build. You can find the full instructions, plus a live working example, on &lt;A href="https://www.dropbox.com/developers/embedder" target="_blank"&gt;the Embedder page here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what a minimal example of triggering the Embedder using JavaScript might look like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;

    &amp;lt;script src='//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="APPKEYHERE"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script type="text/javascript"&amp;gt;

        $(document).ready(function() {
            var url = "https://www.dropbox.com/s/u0bdwmkjmqld9l2/dbx-supporting-distributed-work.gif?dl=0";
            var element = document.getElementById("file_container");
            var options = {
              link: url,
              file: {
                zoom: "best"
              }
            };
            Dropbox.embed(options, element);
        });

    &amp;lt;/script&amp;gt;

    &amp;lt;div style="height:600px;width:800px" id="file_container"&amp;gt;&amp;lt;/div&amp;gt;

&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 14:04:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/631925#M29174</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-10-26T14:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/631940#M29175</link>
      <description>&lt;P&gt;Thank you so much, the code worked! Do you have any suggestions for how to implement this with a password-protected folder? Sadly will not work if I use one.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 15:10:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/631940#M29175</guid>
      <dc:creator>Bryantsssss</dc:creator>
      <dc:date>2022-10-26T15:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/631944#M29176</link>
      <description>&lt;P&gt;Should clarify - password protected link makes me leave the page and no longer allows me to view files in the embedded view. Any way to have the user enter the password inside the embed?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 15:18:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/631944#M29176</guid>
      <dc:creator>Bryantsssss</dc:creator>
      <dc:date>2022-10-26T15:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/632009#M29178</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1585594"&gt;@Bryantsssss&lt;/a&gt; No, unfortunately there's no option for that, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 18:28:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/632009#M29178</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-10-26T18:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/632054#M29182</link>
      <description>&lt;P&gt;No worries, is it possible to pass the folder password directly through the link? I would like to embed it on a webpage where users can see it, but prevent random people from stumbling upon the link.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 21:11:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/632054#M29182</guid>
      <dc:creator>Bryantsssss</dc:creator>
      <dc:date>2022-10-26T21:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering the Embedder using JavaScript</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/632225#M29184</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1585594"&gt;@Bryantsssss&lt;/a&gt; No, unfortunately there isn't a way to do that either, but we'll consider it a feature request.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 13:23:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Triggering-the-Embedder-using-JavaScript/m-p/632225#M29184</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-10-27T13:23:13Z</dc:date>
    </item>
  </channel>
</rss>

