Please, help include custom javascript library "jquery-EmbedPicasaGallery.js" to google site.
I tried 3 methods and always have error:
failed to load external url jquery-EmbedPicasaGallery.js
I tried:
.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://googledrive.com/host/0BziEumkvYpL6Ql9NRFhET2FXM1E/jquery-EmbedPicasaGallery.js"></script>
.
<script type="text/javascript" src="https://docs.google.com/uc?id=0BziEumkvYpL6ZmlHZ2FWQ1NrVG8"></script>
.
<script type="text/javascript" src="https://docs.google.com/uc?id=0BziEumkvYpL6ZmlHZ2FWQ1NrVG8&export=download"></script>
Have you tried downloading the script and running it from your own server?
Is your site being tested on a server, or locally?
It is common for errors to occur when attempting certain things locally, so make sure to run on a server, especially in cases involving php, ajax, canvas image data, http headers, and cookies, to name a few.
Related
I need your help with a strange problem.
The company I work for has a company website.
I have been updating pages on their website the last couple of days.
After updating, I decided to upload the website,
but suddenly the javascript doesn't work anymore.
I get the following error when I press f12
Uncaught SyntaxError: Invalid or unexpected token
base.js:1 Uncaught ReferenceError: $ is not defined
at base.js:1
On the test server (my own server) it works without any problems.
On the main server (company server) it doesn't work.
What could be the issue for this?
It's not on just one page, it's on every single page that the Javascript doesn't work.
[update]
I know about the different versions of Javascript.
This is already fixed in the testing environment of the company website.
This still doesn't fix the current problem.
Thank you
Wesley
On the test site you use jQuery 3.3.1:
<script src="js/jquery-3.3.1.min.js" type="text/javascript"></script>
On the main site you use jQuery 1.10.1:
<script src="https://www.aska-ltd.jp/js/jquery-1.10.1.min.js"></script>
Please both use v3 if you don't have specific needs.
It looks like you are using jQuery for your JavaScript code.
The header of the first page contains a tag for loading jQuery:
<script src="js/jquery-3.3.1.min.js" type="text/javascript"></script>
But on the second page, you never load jQuery.
As I don't know how the file structure of your server is, I cannot tell you the exact path, but you need to make sure you load jQuery in a similar way on your company website.
EDIT:
I noticed that you load jQuery from https://www.aska-ltd.jp/js/jquery-1.10.1.min.js. However, this file is not the original file (compared to https://code.jquery.com/jquery-1.10.1.min.js using MD5). If you want to use this old version (not recommended), you can try to re-download it or simply load jQuery in its latest version from its official server (recommended).
As #NoobTW and #SapuSeven have said, there is an error in the jQuery script on the production site.
On the production site, try replacing this <script src="https://www.aska-ltd.jp/js/jquery-1.10.1.min.js"></script>
with this <script language="JavaScript" type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
Also, if you load jQuery from a CDN, it may help simplify things. Here is one option for jQuery 3: <script
src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E="
crossorigin="anonymous"></script>
See here for more options: https://code.jquery.com/
JQuery never loads at all on the main server. I tried taking the code from the file on the server and evaluating it, but discovered some sort of corruption in the JQuery file your server is returning:
If the same thing happens with an updated version of JQuery, check whether it’s also corrupted. It may be some sort of transformation the server is incorrectly performing.
I'm starting a chrome app. But things like this doesn't work for security reason.
<script src='https://code.jquery.com/jquery-1.11.0.min.js'></script>
<script src='app.js'></script>
So how to add those 2 kind of script to my app?
I tried different things in the manifest file but none of them have been successfull
The simplest way to avoid security issues is to download jquery-1.11.0.min.js and place it in your script directory. This will ensure you won't have security SOAP issues. Then include the files like this:
<script src='/example_local_directory/jquery-1.11.0.min.js'></script>
<script src='/example_local_directory/app.js'></script>
I have a Play framework app which handles sensitive data and so enforces SSL.
I'm building a frontend with React.js , but when I try to load
<script src="https://fb.me/react-0.11.1.js" type="text/javascript"></script>
<script src="https://fb.me/JSXTransformer-0.11.1.js" type="text/javascript"></script>
I get the error
[blocked] The page at 'https://localhost:9443/react' was loaded over HTTPS, but ran insecure content from 'http://dragon.ak.fbcdn.net/hphotos-ak-xpf1/t39.3284-6/10173493_255140104677950_2108691993_n.js': this content should also be loaded over HTTPS.
How can I enforce that the transient dependencies are also loaded via https?
The Facebook "CDN" for React doesn't work over HTTPS right now, sorry. You can instead use cdnjs:
http://cdnjs.com/libraries/react
Your script tags will look something like
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.11.1/JSXTransformer.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.11.1/react.js"></script>
When I use the following header
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
There is no error in my HTML file. But I am facing a problem. Every time I am loading this page , there is the need for internet connectivity.
I have developed an webpage through which some instruments would be controlled through node.js acting as a server. This would be accesible in the intranet (between local computers in LAN) only.
Is there any method to use jquery as a local resource, i.e. If i download and save these files and use it from the local hard disk.
I saved both the files jquery-1.8.3.js and jquery-ui.js in the same folder as the html and used it with <script src="/jquery-ui.js"></script> it is giving resource not found 404 error.
If the .js file is in the same folder as the .html, then you should be able to include it with
<script src="jquery-1.8.3.js"></script>
Download the jquery and put it in your scripts folder and use like this
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="scripts/jquery-1.8.3.min.js"><\/script>')</script>
This will first check for the CDN if exist it will load from CDN other wise it will take local one
uses of CDN are in this link
I'm using the out-of-the-box JQuery UI tabs- they work fine on an unsecured page but not on the secure https:// page.
I'm calling my scripts like this:
<script src="//code.jquery.com/ui/1.8.22/jquery-ui.min.js" type="text/javascript"></script>
<script src="//jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
<script src="//jquery-ui.googlecode.com/svn/tags/latest/ui/minified/i18n/jquery-ui-i18n.min.js" type="text/javascript"></script>
Examples here:
http://ntcla.com/fb-static.php and
https://ntcla.com/fb-static.php
(see map at the bottom of the page)
Any help is appreciated!
It looks like there is an SSL cert error on the code.jquery.com link. You could just download it and host it on your own site/CDN.
SSL certificate error will be thrown when you try using any js in following manner
download above files and copy them on your server and access them using relative paths on your script