views:

249

answers:

4

Ok so I'm lost here, frustrated and pulling my hair and out. Plus probably about to be fired or take a pay cut.

I moved Files from a development server to my local machine. The files are consistent (used diff tool), all the dependencies are there. It works for the most part. The problem is that the some of the javascript (not all) is just not working. We're using jquery and a lot of plugins for it. I've checked with the web developer plugin in firefox and all the js files are loading. I cleared the cache in both firefox and chrome multiple times to no avail. The development server is a windows server running wamp. My local machine is running ubuntu. Somebody tell me what I missed.

+1  A: 

It may have something to do with JavaScript's security limitations. (In certain circumstances) You can only operate on URLs or pages from the current domain, which most likely changed when you moved the files off the other server. More here.

banzaimonkey
My thought exactly. +1
Tomalak
This is a good point. Especially if your script is using jQuery to make AJAX calls.
gurun8
The only thing about this is everything was moved over. The database etc. I'm not linking to anything outside my server. I just double checked the javascript references.
Adam McMahon
@Adam I guess it's time you tell something more specific than "does not work"...
Tomalak
A: 

Are you accessing the html web pages through the webserver and not simply double clicking the file to open it?

Also if you have WebDeveloper toolbar installed the click "Disable", "Disable Javascript" and make sure "All Javascript" isn't ticked.

rtpHarry
+1  A: 

Download firebug as a Firefox extension and view the http request and responses. Easiest may be from within the 'net' tab to determine if your script is making a request.

Very likely that it is a source domain issue. There are no work-around for this issue. The ajax request and the source data must be on the same domain.

DaveG
A: 

Are you running the files via a webserver, or just opening the files directly? If it's the latter, you'll want to set up a server on your local machine for local testing, and serve the files using it. Otherwise, you'll very likely run into the domain restrictions others have mentioned above.

rmurphey