Zero ClipBoard issue - javascript

I am trying to integrate Zero Clipboard into tornado web application and I am running into some problems.
http://jonrohan.github.io/ZeroClipboard/#demo this page works perfectly, but when I try to view same page on my local machine ('Save page as..' to get all the files locally) after opening HTML file I get http://snag.gy/sT1y2.jpg . And this happens (same error) even if I do everything what is written in tutorial (only required lines of code).
Maybe some one had similar problem?
Thanks

I had the similar problem and I made it to work by uploading it to server where it worked fine.
Instead of testing it on local, please test it some where on server.

Related

Why my changes are not displaying to the browser?

(this a long text but it's necessary for you to understand what I'm struggling with)
I've been trying to find a solution to this but I just couldn't find any info related to this so I wonder if it has to do something with my computer.
The problem is that when I am coding working on website in neither Sublime Text or VSC, (in the beginning everything was okay, I used to refresh the page or use a local server and my changes display on the Web page) any changes I make in the .html, .css or .js files don't show on the browser.
I tried closing and re-opening the text editor and the files, (that used to work at first) but now that doesn't work anymore, any simple change made after this "forzing" happens, just doesn't display on the browser. I tried also using opera, mozilla, chrome, and the problems persist.
I sent the files once to a friend of mine, he opened the .html file and my changes were working. He resend me the code after he used it, I pasted it (the same I sent him before that wasn't working) and then magically it worked!!!!
Now every time that happens I have to have Another personas computer to open the .html file, they resend it to me, I paste it again in order to make it work. This is so annoying and frustrating. If any of you could help me with anything to fix this, I'd very much appreciate it.
So in short, until some point my changes are displayed, but after that, the page stays the same as when it "freezes" and no matter which file I modify, the page just doesn't show changes after that freezing point
Thanks for your atttention
Since it doesn't work on a local computer, you can always use an online editor like Replit or CodePen (they worked quite well for me) ...
It could be that the files aren't correctly saved into your working directory. If you go into your terminal and navigate to the directory these files you're working on are in and type ls it will show all the files in this directory. If your files aren't there then you know you didn't save the files correctly into your working directory.

Tempalte File won't update in Browser

im trying to change some behavior of a webpage. The page is built using SMARTY so the file that won't update is a .tpl file. Containing mostly JavaScript. The whole thing is weird because on my local drive (IDE) the file is the way i want it to be, it is the correct version on the server when i check it with SFTP.
BUT if i open the page with a browser, even a newly installed one, the code inside that page is the old version.
Now i can't send any error because there obviously is none.
So im lookin at a problem i can't fix or even begin to untangle.
I tried following things:
Restarting apache2
Deleting the file and uploading the correct version (here i might add the site broke when i deleted it and tried to view it)
This has been bugging me for a long time so it seems time couldn't fix it either.
I hope somebody has any idea to why this is happening!
Thanks
Clear (delete all cache files) smarty cache!
More details about cache dir: https://www.smarty.net/docs/en/api.set.compile.dir.tpl

Js file loaded from server doesn't work, but loaded locally works

I have an Android webview app.
I decided to move a js file online so that I can make changes that affect the app immediately without having to update the app.
If I load the script locally, everything works well.
If I load it from the server I placed it in, it doesn't.
Note: when I test the WebView app in my browser, everything works well.
On iOS works well either.
I only got problems on Android.
After a lot of searches, I figured out that internet permissions must be allowed in AndroidManifest file, and it is.
Javascript should be enabled, and it is.
I simply can't figure out what the problem is.
I also tried playing aroung with the html tag and its attributes, but with no result.
Here is the script:
<script type="text/javascript" src="http://mywebsite.com/content_controller/list.js"></script>
UPDATE: even an file loaded from external server doesn't work, while loading it locally works.
I don't know exactly what is going on, but you might want to do the following.
1.) Did you forget to make http:// to https://
2.) add async to your script
3.) click on your link. Is the link correct. I can't go on it.

Textillate works locally but not on live site

I am using the plugin Textillate to animate some text on my site.
I have developed the site locally to my liking and today I decided I wanted to transfer it to a live site. After doing so , textillate breaks. I've double checked my localhost and my live server are running the same version of php.
Why is this happening? What could cause an error on the live site, but not locally? It doesn't make much sense to me. All files are included, everything is word for word the same.

Javascript not working on localhost, but it is working on Live site

I am facing JavaScript problems on XAMPP Localhost. The Collapse Buttons, go to top button and jQuery news feed are not working on every site on my localhost.
But Facebook, Twitter, Plusone buttons load correctly from remote server i.e. from the respective Social Sites.
So, I think it narrows me to the point that the JavaScript files hosted locally are not executed while those from Facebook etc. are getting executed.
I tried reinstalling XAMPP but didn't work.
I know this is old but, I had the same problem and found this question while searching a solution. But I have lampp installed on ubuntu and since Linux asks permission to execute ANYTHING, the local js files which resided in htdocs were without permission. After:
sudo chmod 777 -R /opt/lampp/htdocs
... everything was OK. Hope this helps future wanabee web developers.
It should not matter whether your files are local or not...javascript should still get executed. Try using some debugging tool like to see if you get any errors that only occur on your local machine. Because it could be that you are running some code that is depending on a domain or whatever.
I know this post is old and the answer is already given, I just wanted to give an answer of a possible reason that I encountered in case someone else finds this and it does not help.
Make sure your entire html code gets executed by viewing your page source. With me, half my code was not being executed due to a PHP error that was working on localhost with the local database but not on live with the live database. This caused the HTML to cut of from that point above my javascript.
So check your page source. If it is being cut of somewhere, find out why :)
I had the same problem. I try a lot but finally solved. The main problem was my browser cache that prevents from loading the new JavaScript file. My recommendation is that clear your browser cache data then close the browser and reopen your site again it will work perfectly.
remove any (pre in post ) blank spaces from filenames of your namespace example : localhost:port/dir /index.html
localhost:port/dir/index.html
In similar cases,
If web project site runs JS on Live Server but not on locally opened index.html,
try to check validity of HTML File Paths,
e.g you may have written:
<script src="script.js"></script>
instead of:
<script src="./script.js"></script>
Try to add ./ before file name.
./ means Current directory.

Categories

Resources