Solved

dropbox issue

Posted on 2014-12-04
5
99 Views
Last Modified: 2014-12-04
Hello,
  My company block dropbox from within our network.

Here is the script::

<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="<%=ApiKeySettings.DropboxAppKey%>"></script>

Open in new window


Is it possible to download the dropins.js file to local machine?

Thanks
0
Comment
Question by:SiemensSEN
5 Comments
 
LVL 37

Expert Comment

by:Neil Russell
ID: 40480766
If it is blocked then it is blocked.  It is blocked for a reason and you need to take that up with your IT team.
EE is not allowed to help you to get around your companies security policies I am afraid.
0
 
LVL 32

Expert Comment

by:Big Monty
ID: 40480813
check with your IT department and find out why they have it blocked. if you're working on a company application that uses dropbox, explain that to them and see if they can make an exception.

if the script itself doesn't make any connection to dropbox, then ask them to download it for you so you can put it on your system. if it does interface with dropbox, then there is no way to use it without getting your IT department involved
0
 

Author Comment

by:SiemensSEN
ID: 40480836
OK. is there a  function to test if Dropbox is allowed/blocked.  If it is not allow then don't load the javascript.. is that possible. Currently, I have to wait until it time out
0
 
LVL 32

Expert Comment

by:Big Monty
ID: 40481138
if you use jquery, you can use the getScript() function

http://api.jquery.com/jQuery.getScript/
0
 
LVL 10

Accepted Solution

by:
Hans Langer earned 500 total points
ID: 40481330
Check the domain access first and if it is ok then attach the script:

$.ajax({
  url  : 'http://www.dropbox.com',
  type : 'post',
  data : 'a=b',
  timeout:3000 //3 seconds
}).done(function(data, statusText, xhr){
  if(xhr.status==200){ //200==OK 
  //ADD SCRIPT TO YOUR PAGE
   var script = document.createElement( 'script' );
   script.type = 'text/javascript';
   script.src = 'https://www.dropbox.com/static/api/2/dropins.js';
   $("head").append( script );
  }
});

Open in new window

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now