I have implemented the .NET Login functionality, and I am receiving a JavaScript Error whenever a User clicks on the Log-In Anchor Button to reach the Login.aspx.
This Anchor Menu Button is part of the CSS Menu which is defined within the Master Page.
When I run this locally, the error indicates:
'ddmegamenu' is undefined
However this script is defined within the MasterPage:
All of the sub-pages can see this script including the Login.aspx:
<script type="text/javascript">
ddmegamenu.docinit({
menuid: 'solidmenu',
dur: 200 //<--no comma after last setting
})
</script>
Here is the development site: http://www.virtualpetstore.com
The Login.aspx is within a seperate Account Directory, but I don't think this should be a problem.
If anyone can see this issue, I would really appreciate it.
You're getting the error because you're not properly referencing the JS files on the Login.aspx page. This is what the console says (in addition to the error that you posted):
GET http://www.virtualpetstore.com/Account/js/jquery.js 404 (Not Found)
GET http://www.virtualpetstore.com/Account/js/jquery-1.5.min.js 404 (Not Found)
GET http://www.virtualpetstore.com/Account/js/jquery-ui.min.js 404 (Not Found)
GET http://www.virtualpetstore.com/Account/js/jquery.serialScroll-min.js 404 (Not Found)
GET http://www.virtualpetstore.com/Account/js/ddmegamenu.js 404 (Not Found)
GET http://www.virtualpetstore.com/Account/js/jquery.scrollTo-min.js 404 (Not Found)
GET http://www.virtualpetstore.com/Account/js/jquery.simplemodal.js 404 (Not Found)
GET http://www.virtualpetstore.com/Account/js/jquery.cycle.min.js 404 (Not Found)
GET http://www.virtualpetstore.com/Account/js/jquery.actual.js 404 (Not Found)
GET http://www.virtualpetstore.com/Account/js/contact.js 404 (Not Found)
Ensure that your JS files are being loaded and your error will most likely disappear.
Hint: Your script tags should look something like this:
<script type="text/javascript" src="/js/ddmegamenu.js"></script>
The problem is simple, on Account/Login.aspx you try to include Account/js/ddmegamenu.js
but you need on this url /js/ddmegamenu.js
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.
<script src="../js/goto.js" type="text/JavaScript"></script>
Comes back as: root/js/goto.js
should be: root/mainfolder/js/goto.js
I tried in the src="/js/goto.js" but does not work either. I keep getting 404 error. Running IIS10. Works on my desktop but not thru the server. All javascripts are doing this. Help!
I try using minify version 2.1.3(old), because last version not working, when i try combine 3 js and refresh website, it's write 404 not found, i already try follow instruction from this youtube [ Minify ] Improving Performance - Part 2 but still not working.
location ex: C:xampp/htdocs/test/index.php.
location ex: C:xampp/htdocs/test/jquery-1.8.3.min.js.
location ex: C:xampp/htdocs/test/jquery-1.9.1.min.js.
location ex: C:xampp/htdocs/test/jquery-1.9.1.js.
and JS from : localhost/minify/builder/
<script type="text/javascript" src="/min/b=test&f=jquery-1.8.3.min.js,jquery-1.9.1.js,jquery-1.9.1.min.js"></script>
already try change the src to "/test/min/b=test&f=jquery-1.8.3.min.js,jquery-1.9.1.js,jquery-1.9.1.min.js"
404 not found it's write when i check the source code shift+ctrl +i same like this video(youtube start in 5:08)
Failed to http://localhost/test/min/b=test&f=jquery-1.8.3.min.js,jquery-1.9.1.js,jquery-1.9.1.min.js the server responded with a status of 404 (Not Found)
anyone know what wrong? thank you
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"
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)