Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
jQuery won't execute on server
Old 03-10-2010, 07:28 AM jQuery won't execute on server
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
This is probably something really obvious but I must have been staring at the screen too long to notice!

I have linked a few .js files to my webpage, all work fine locally, but now that I've uploaded the files to my server one of which won't execute.

I can see from looking at the Web Developer Toolbar that the script is being picked up, but it's just not doing anything!!

See the page here:
http://bit.ly/cTAzoP

This is the script that is supposed to turn the white text that is layered over the image so that it has a blue background.
http://bit.ly/bBLPkL

I even tried adding an alert statement at the top of the script, and that didn't execute either.
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
 
Register now for full access!
Old 03-10-2010, 09:41 AM Re: jQuery won't execute on server
Junior Talker

Posts: 2
Trades: 0
Try linking to '/script' instead of just 'script'. Failing that, link directly with full url:

so src="http://www.freshbeat.co.uk/concept/valleytheatre.co.uk/10032010/script/span-spacer.js".

Post back what happens.
jonuk is offline
Reply With Quote
View Public Profile
 
Old 03-10-2010, 02:32 PM Re: jQuery won't execute on server
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Your current paths to the scripts are correct, so that is not the issue. Your problem is a JavaScript error in your "span-spacer.js" file. It looks like your text-editor creates newlines that don't work on the Linux operating system. Some of your scripts are being displayed without newlines, and then require semi-colons; between statements. This is causing a JavaScript error. It is a good idea to always use semi-colons between statements regardless of the fact JavaScript allows you to break statements with a newline.

I recommend you use a different editor.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 03-10-2010, 02:36 PM Re: jQuery won't execute on server
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
On second glance, it looks like your server is not Linux at all, and I don't see Apache headers either. It doesn't say Microsoft or anything else I've heard of either. The server identifies itself as:
Quote:
Server: nginx-catap/0.8.7.528.179136c
What ARE you uploading the site to?

***EDIT***
Ok, a quick Google search tells me that server is in fact Linux...
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 03-10-2010 at 02:38 PM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 03-10-2010, 02:53 PM Re: jQuery won't execute on server
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Ohhhh I see! That's interesting because I did notice (when previewing the script through the Web Dev Toolbar) that the comment I initially had at the top was on the same line as the script whereas the other scripts displayed fine.

I use Espresso for Mac, but it gives you the option to change the line Endings (I did wonder why this feature was even there)




I'm guessing I should go for the Unix option?
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Old 03-10-2010, 02:59 PM Re: jQuery won't execute on server
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Actually using the Windows option covers ALL operating systems. It is the CLIENTSIDE where you need the delimiters to be correct
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-10-2010, 03:20 PM Re: jQuery won't execute on server
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
Originally Posted by chrishirst View Post
It is the CLIENTSIDE where you need the delimiters to be correct
Right, what was I thinking? Need to refresh the coffee. I guess I was imagining the server intercepting those files and serving whatever it understood...
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 03-10-2010, 03:34 PM Re: jQuery won't execute on server
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It's probably the newness of married life that hasn't worn off yet
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-10-2010, 05:03 PM Re: jQuery won't execute on server
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Thanks for the advice. Does this mean using the Windows option is the best bet?
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Reply     « Reply to jQuery won't execute on server
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29341 seconds with 12 queries