I am working on a site, and everything is working in my local environment as well as on a test server I have here and everything works fine. but when I upload it to my host, nothing seems to work!?
The Asp.Net javascript validators fire, but any and all of the jquery is not working? I even put in a simple
$("#test").html("working");
and
<div id="test></div>
And nothing is happening? I have triple checked that all the js is uploaded (to my /js/ directory
The site is here: (it is in it's infancy still... barely started) and the Login/Register/Contact buttons should all pull a modal popup (not change pages, that should only happen if JS is disabled) and the word 'test' should show up under the menu.
Can JS be disabled from the server? Wouldn't make sense though as the asp javascript validators are showing up?
I am completely confused here, any ideas would be great!
I am working on a site, and everything is working in my local environment as well as on a test server I have here and everything works fine. but when I upload it to my host, nothing seems to work!?
The Asp.Net javascript validators fire, but any and all of the jquery is not working? I even put in a simple
$("#test").html("working");
and
<div id="test></div>
And nothing is happening? I have triple checked that all the js is uploaded (to my /js/ directory
The site is here: http://whoowes.me (it is in it's infancy still... barely started) and the Login/Register/Contact buttons should all pull a modal popup (not change pages, that should only happen if JS is disabled) and the word 'test' should show up under the menu.
Can JS be disabled from the server? Wouldn't make sense though as the asp.net javascript validators are showing up?
I am completely confused here, any ideas would be great!
Share Improve this question asked Jan 29, 2009 at 20:24 naspinskinaspinski 34.7k38 gold badges118 silver badges175 bronze badges 4- Not to snoop around, but where is the jQuery file? Is it in the root directory? Do you have some kind of routing set up for js files? – geowa4 Commented Jan 29, 2009 at 20:34
- BTW - I think the idea for your site is great. – Diodeus - James MacFarlane Commented Jan 29, 2009 at 21:32
- Side Idea is indeed fantastic. – Pim Jager Commented Jan 29, 2009 at 22:00
- I know it is a late answer but i didn't see anyone mention this in their answers. Could it be that it does not work because of the missing '"' char of the div id? It is always these kind of mistakes that make us go crazy for a couple of days re-installing and re-debugging things we do not have to. ;) – MikeL Commented Jun 4, 2012 at 8:08
6 Answers
Reset to default 7You could always let Google do your work for you:
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
</head>
One pleasant side-effect is that you'll save a little bandwidth, and because many sites now use Google's AJAX API, many users will already have it cached in their browser.
<script src="/jquery.js" type="text/javascript"></script>
http://whoowes.me/jquery.js = 404
Maybe you didn't upload the file to the right place?
(you're not pointing to the /js/
folder)
Make sure you have
$(document).ready(function () {
...
});
surrounding your existing code.
The way the site may be configured on IIS is via their virtual directory setup that may not be including you js folder. The server may also not be allowing the site to deliver the js based on file permissions.
I'd say you put a ticket into your webhosting provider and have them look at why the server is not delivering the file. Another option is the IIS server is not set to allow delivery of the js file extension.
Hope this helps
my host did not default to have .js in their MIME types, so I had to add it in:
extension: .js
application/x-javascript
The file whoowes.me/jquery.js can not be found. Make sure you use the right file path in the script tag.