JQuery .load() function not working on WebKit - javascript

I am trying to use the jQuery.load() function, and it works on Firefox, but not on Safari and Chrome. The odd part is that it works on mobile Safari.
All of the posts I found on this subject appeared old and outdated.
Does anyone have a solution to fix this problem?
Here is sample code from my page:
<div class="navButton"></div>
<script>
$(".navButton").load("bottomNav.html");
</script>

The error console tells the story here.
Failed to load resource: the server responded with a status of 404 (Not Found)
http://yellowtailderby.com/jquery-2.1.0.js
Uncaught ReferenceError: $ is not defined
So, when you try to execute:
$(".navButton").load("bottomNav.html");
The $ symbol is not defined because jQuery is not successfully loaded.
The issue seems to be that this:
http://yellowtailderby.com/jquery-2.1.0.js
does not exist (gets a 404 error) so this script tag:
<script src="jquery-2.1.0.js"></script>
is not working properly. The fix is to either correct the script tag or make sure that particular file is properly located on your server at that path.
I am getting the exact same error in Firefox, so I suspect that maybe you have that file in your browser cache in Firefox (so it's getting loaded via cache), but it doesn't actually exist on the server. The Firefox reports:
"NetworkError: 404 Not Found - http://yellowtailderby.com/jquery-2.1.0.js"

Related

Throw "net::ERR_ABORTED 404" error for Google's JSAPI

In our solution, we reference the JSAPI offline file. However, it returns me "net::ERR_ABORTED 404" error when the page loads.
The error message is;
https://www.google.com/uds/?file=visualization&v=1&packages=corechart
net::ERR_ABORTED 404
Full console log:
This is how I referenced the js file.
However, This works when I use the online js (https://www.google.com/jsapi) instead of using an offline js file.
Note that I'm using jquery 1.11 version (also an offline file).
Any idea why it's not working when I use the offline js?

Error on line 0. Google jquery api

Since yesterday I have a strange error on line 0 in "https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" (Google jQuery Api). It just says "Script Error". I have researched about the error, but I just found something like this. I dont think Google forbid Same-origin policy access.
Can anyone tell me how I can fix this error?
I get this Error in Safari, Chrome and Firefox.
edit:
I monitor the error messages with the help of
window.onerror = function (text, file, line) {
}
It seems, that a Problem at the google Hosted jQuery File occured, which you examine with window.onerror. When you want to see a correct Error, download the Library and use a internal link to the Library:
<script type="text/javascript" src="//your.site.com/jquery-2.1.1.min.js"></script>
If this dont fix the Error, use the non-minified Version to determine the Error.

Asciidoctor.js Live Preview on Google Chrome

I'm trying to use Asciidoctor.js Live Preview on Google Chrome, but isntead of my doc i see
Error
TypeError : Cannot read property 'join' of null
It also raises an JS error:
Denying load of chrome-extension://iaalpfgpbocpdfblpnhhgllgbdbchmia/js/jquery-2.0.3.min.map.
Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
Probably i need to add sth to manifest.js file, but I have no idea what.
I cannot figure out how to fix this issue. Any advice would be appreciated.
There's an open issue on Github for this: https://github.com/asciidoctor/asciidoctor-chrome-extension/issues/32
Are you using Windows 8.1 ?
The two JS errors are not related:
Denying load of chrome-extension://iaalpfgpbocpdfblpnhhgllgbdbchmia/js/jquery-2.0.3.min.map.
See jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found)
Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
The second one is just the consequence of the first one because jquery-2.0.3.min.map is not declared in the manifest.

What does view-response.js in Chrome do?

When loading a page (200 OK response header), I received an error in the HTTP response add-on for Firefox:
[Exception... "File error: Not found" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://view-response/content/view-response.js :: sendRequest :: line 186" data: no]
What does that file do? (Contents pasted into JSBin here, notice how semicolons are missing.)
I was able to open it in Firefox and not just Chrome (but not Opera and IE).
That's an error with the plugin internal code, nothing to do with your code. The chrome:// is a little misleading, it's nothing to do with Google Chrome, Mozilla refers to elements of their UI engine as the "chrome".
The error is specifically around the line:
xhr.send(valueOfElement("body-textarea"))
Which is an ajax request initiated on this line:
xhr.open(valueOfElement("method-select"), valueOfElement("uri-input"), true)
...and since you are getting NS_ERROR_FILE_NOT_FOUND I presume the that URL return by the function call valueOfElement("uri-input") is returning a 404 or may be an invalid URL.
The lack of semi-colons in the JS file is (IMO) bad practice, but nothing to do with the error.
Long story short: ignore the error, there's nothing you can do about it except for add some error handling and rebuild the plugin package, which you probably can't do in a meaningful way unless you wrote the plugin.
It has nothing to do with your site code.

Call jQuery Function after ajax load

So, the thing is i'm trying to import a slider with ajax, the slider works if you access the page directly:
http:// www.iloja.pt/ajaxload/ipod.php
if you try to access iloja.pt and click "reparações" and after that click "iPod" it calls the ipod.php page but the slider doesn't work. I tried to include the js files in many ways but the
i know i have to use bind function, but don't know how to do it.
There seems to be some javascript errors, specifically:
"animation is not defined"
You have many errors in that page, see Javascript console on Chrome or Firebug on Firefox.
In particular I can see this errors:
Failed to load resource: the server responded with a status of 404 (Not Found) [http://www.iloja.pt/js/jquery.ennui.contentslider.js?_=1326816532863]
Uncaught TypeError: Object [object Object] has no method 'ContentSlider'
your problem is that the browser can't load the contentslider.js library so you have an exception when using ContentSlider Method.
Try to fix the loading of the js.
Have you tried adding the async: 'false' parameter to your ajax call, that way it should load your code entirely before doing anything else...

Categories