views:

1537

answers:

7

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!

+3  A: 
<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)

Diodeus
I changed it so the script registration shows... and it still isn't working - I get a 404 if I try to browse to /js/jquery.jsDoes that mean it isn't there? I know that sounds dumb, but it shows up in ftp?
naspinski
Try: /js/jquery.js
Diodeus
A: 

The file whoowes.me/jquery.js can not be found. Make sure you use the right file path in the script tag.

Pim Jager
A: 

I am registering them in my code-behind:

Page.ClientScript.RegisterClientScriptInclude(typeof(_), "jQuery", ResolveUrl("~/js/jquery.js"));
Page.ClientScript.RegisterClientScriptInclude(typeof(_), "jqModal", ResolveUrl("~/js/jqModal.js"));
naspinski
This should be a comment or an edit to your question, not an answer.
Diodeus
+6  A: 

You 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"&gt;&lt;/script&gt;
</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.

Luke Dennis
I use this method as well.
strager
+1  A: 

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

chews
+1  A: 

my host did not default to have .js in their MIME types, so I had to add it in:

extension: .js

application/x-javascript
naspinski
OMG! They're sooooo stupid!
Diodeus
A: 

is missing a quote (") did you find the solution? i cant get mine to work either

confio