255 posts
  • Bought between 10 and 49 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 250 000 and 1 000 000 dollars
  • United States
BuchmannDesign says

I have a customer having a problem with one of my themes. I think the main problem is that the javascript isn’t running. So the slider, lightbox, etc. don’t work and the whole site is broken.

The code is pointing to the correct .js files and the .js files do exist. If i navigate directly to them it does open up in the browser.

Without posting any specific code, does anyone have an idea what could be the problem? Could it be a “permissions” issue on the server, or something else kind of technical?

I’ve combed through all the code on their live site and can’t find anything wrong!

Thanks! John

1478 posts The right tools with none of the gimmicks
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Bought between 10 and 49 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • United States
+1 more
PixelBin says

Just a quick note before the explanation, but that’s why you should always make sure the site works without Javascript. :)

Anyway, you should make sure the folders are in the same structure on their servers as they are on your HDD . Maybe they put the Javascript folder inside another folder, or renamed it, or something of the sort, and that’s why the target to the file doesn’t work.

Hope this helps a bit.

616 posts
  • Power Elite Author
  • Referred more than 2000 users
  • Power Elite Author: Sold between 2 000 000 - 4 999 999 dollars
  • Austria
  • Bought between 100 and 499 items
  • Has been a member for 5-6 years
+4 more
Kriesi says

sounds like the script has an error somewhere inside it that stops it from executing properly. I would recommend to use firebug and check if errors do exist.

Another possible option: does your script use a javascript library like jquery? does your customer use the same version as you do? different versions could also cause problems. ive often encountered this when using wordpress and someone used a plugin that overwrites the version that is shipped with the worpdress installation.

1478 posts The right tools with none of the gimmicks
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Bought between 10 and 49 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • United States
+1 more
PixelBin says

Kriesi makes a good point. I’ve encountered errors in Javascript in my themes on Firefox, and everything continued to work fine, but if I looked at the same pages in IE6 /IE7, everything would break and none of the scripts would work.

255 posts
  • Bought between 10 and 49 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 250 000 and 1 000 000 dollars
  • United States
BuchmannDesign says

Thanks for all the help! The customer is using the exact same jquery files and .js files as what i supplied with the theme, so that can’t be the problem. The site structure also seems good. When i navigate directly to the .js file, the js code appears on the screen.

I’m not getting any errors with Firebug, but then again, i don’t really know how to use that “console” thing. I’m probably not using it right.

But i am getting a javascript error when testing in IE. Gives me a line number. Wow, IE6 FTW ! :) Problem is the referred line number looks totally fine. Well, at least i have something to go on.

So you think a small JS error will cause ALL javascript to not work on a site?

616 posts
  • Power Elite Author
  • Referred more than 2000 users
  • Power Elite Author: Sold between 2 000 000 - 4 999 999 dollars
  • Austria
  • Bought between 100 and 499 items
  • Has been a member for 5-6 years
+4 more
Kriesi says

yea that could happen. another tip i can provide: i ve encountered some of these problems as well: js worked in every browser except for ie. almost always i forgot to remove or add a ; or ,

94 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 5 000 and 10 000 dollars
  • United Kingdom
JimmyP says

Linky? Code? ... Can’t really help without a glimpse at the code :)

1478 posts The right tools with none of the gimmicks
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Bought between 10 and 49 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • United States
+1 more
PixelBin says
yea that could happen. another tip i can provide: i ve encountered some of these problems as well: js worked in every browser except for ie. almost always i forgot to remove or add a ; or ,
So true. Those problems I was referring to in an earlier post were also ”,’ and ”;”. Internet Explorer doesn’t like them, so it might as well be messing things up in other browsers.

About that line number… I’d say look within 20 lines of that number, lol. It’s rarely accurate. I found my error within 11 lines of the line number it gave in the error.

255 posts
  • Bought between 10 and 49 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 250 000 and 1 000 000 dollars
  • United States
BuchmannDesign says

Thanks everyone! Actually the javascript doesn’t show up in ANY browser. I was off on vacation for a week and i’m finally able to look into this again. Sucks that i have to probably spend all day debugging this for a customer. I figure i’d fix it just in case something is wrong with the theme! :)

by
by
by
by
by
by