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...
Related
This is like 8 hours into this that I'm trying to fix it.
This might be a petty issue, but I'm not sure why in the world it isn't working.
I'm trying to refresh a div with jQuery.Load but it throws a weird 404 error. The page does exist and I'm not sure why it ain't taking it.
It was working well before when I hadn't added wordpress header files. Once I added them, it went haywire.
Here's my code
$( "#feed" ).load(window.location.href + " #feed" );
I've also tried this :-
$( "#tab1" ).load("http://example.com/community.php?#tab1" );
The JS code is written on the same file community.php
Here's the error :-
Failed to load resource: the server responded with a status of 404 (Not Found) community.php:1
All the examples I see have a space between the selector and the URL. Like so:
$("#tab1").load("http://example.com/community.php? #tab1");
Ref: http://api.jquery.com/load/ - "Loading Page Fragments"
Also, it seems problematic to load a fragment into a div that has the same id. If the space does not resolve the issue, try removing the #tab1 id from the page?
$("#tab1_target").load("http://example.com/community.php #tab1");
Also just noticing that ?... which seems odd as you are not passing any GET parameters. Not sure how well you copied your actual code into the question so this might all be moot.
I'm trying to embed a javascript from snapppt.com into a cms page. It shows me in console that the script has been loaded, but there is nothing showing up.
This is the code i get from snapppt.com:
<script src='//snapppt.com/widgets/widget_loader/724028e3-d261-411c-8042-c1901fbc8ad7/carousel.js' class='snapppt-widget'></script>
Do I need anything in addition to this?
I've tried to use the script and i get error in the console
Uncaught TypeError: $ is not a function carousel.js:69
I think that you use the code correctly but there is some error in the script that you are loading
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"
A jquery plugin named "binaryajax.js" exists that can be used to read and examine data from images. When I try to include this script in my page (just including it, without even using it), I get a javascript "Access is Denied" error in jQuery 1.7.1. No other jquery plugin I have ever used has had an error like this. I have seen no other reference to anyone else having this error except for me. I would like to be able to use this because I need to examine the EXIF orientation tag inside of an image file in javascript, but this error is preventing me from doing so. Can someone explain why I would be getting this and what I can do to make it work for me? Here is the reference to binaryajax.js:
http://www.nihilogic.dk/labs/binaryajax/binaryajax.js
All I am doing to get the error is to include the following in my page:
<script src="~/Scripts/binaryajax.js"></script>
What am I doing wrong, if anything?
EDIT:
Through much trial and error, I tracked down what is causing the error, although I still do not know how to correct it:
On my home page I have two links of the following format:
<a onclick="$('#home-form-settings').submit();">
Each one has click-event handlers that point to a form on the home page and will cause a submit of the form.
These links are not even on the page where I am including and trying to use binaryajax.js, but because they are on the home page they for some reason get included in every other page I visit in my asp.net MVC web application. If I remove these links, I do not get the Access Denied error but their presence is preventing me from using this plugin. Does that make sense?
How can I use the plugin on some other page and keep these links on the home page?
My java script and jquery doesn't work on all of my pages.
It works on the home page http://www.steadfastdesignfirm.com/rgw but not when I go to any other page like http://www.steadfastdesignfirm.com/rgw/#index.php etc.
I have a javascript function that loads content from another page into a div dynamically (the div is #ajax) and only the scripts run on items within that div are not working. For example, you'll see the text resize tool when you visit the main page and it works just fine, but when you click on another main tab, it's completely disabled. I think the ajax is causing the elements to become disabled because they only load on document.ready. What other approach can I take to keep these scripts working?
Your syntax for the .load() method looks wrong. Refer to this:
http://api.jquery.com/load/
Should be something like
$('#ajax').load(url, function() {
//do hover binding
});
$('#ajax').load()(function(){
btn.js:1Uncaught TypeError: object is not a function
$(".btn").hover(function(){
$('.end-rght-h, .end-rght-v',$(this).parent()).addClass("hvr");
},
function(){
$('.end-rght-h, .end-rght-v').removeClass("hvr");
});
});
Something is breaking on that load somewhere..
Plus
Uncaught TypeError: object is not a function
doctors.jpgGET http://www.steadfastdesignfirm.com/rgw/BASE_URL/images/headers/doctors.jpg 404 (Not Found)
barazi.jpgGET http://www.steadfastdesignfirm.com/rgw/BASE_URLimages/pages/doctors/barazi.jpg 404 (Not Found)
berinstein.jpgGET http://www.steadfastdesignfirm.com/rgw/BASE_URLimages/pages/doctors/berinstein.jpg 404 (Not Found)
byrnes.jpgGET http://www.steadfastdesignfirm.com/rgw/BASE_URLimages/pages/doctors/byrnes.jpg 404 (Not Found)
deegan.jpgGET http://www.steadfastdesignfirm.com/rgw/BASE_URLimages/pages/doctors/deegan.jpg 404 (Not Found)
desai.jpgGET http://www.steadfastdesignfirm.com/rgw/BASE_URLimages/pages/doctors/desai.jpg 404 (Not Found)
Base url? Something incorrect there.. You need to debug your site big time man.
Like Research link
research.phpGET http://www.steadfastdesignfirm.com/rgw/research.php 404 (Not Found)