PDA

View Full Version : Uploading Javscript to a website??



pyros
08-07-2011, 10:16 PM
I've uploaded a website with Filezilla but for some reasons my Coin-slider isn't working properly. The 'Previous' & 'Next' show up aswell as which slide number at the bottom but the images fail to show.

Is there something i need to do in order for the Javascript to run on the website?

I'm new to all this. Sorry.

Regards,

jscheuer1
08-08-2011, 12:43 AM
Some hosts don't allow it. But no, generally you can run most javascript on most websites with nothing special added. A javascript is like a css file or an image file. It's a resource for the page. As long as it's on the server and referenced by its path (if any) and filename with the correct tag, it's available to the page. It's really more like a css file than an image, in that css code can go on the page or in a separate file. So can javascript. The syntax is just a little different.

Many people get excited about javascript when they haven't used it before. Most of it's nothing special. It's just text code that tells the browser what to do, like HTML or css, except that it can do more things in real time in response to the user or other circumstances in ways those others cannot.

There are some security issues with javascript that those other languages don't have. But modern browsers take care of that for you, not allowing anything dangerous or even suspect, erring on the side of caution.

It would probably be a good idea to post a link to your page with the script. That way we could have a better chance to see what's what.

Please post a link to a page on your site that contains the problematic code so we can check it out.

pyros
08-08-2011, 01:42 PM
As far as i know all the JS and CSS files are in the right places and everything points to them.

Heres the link: http://earlzevents.com/Services.html

If you need anything let me know.
Thanks.

jscheuer1
08-08-2011, 03:09 PM
Looks like the javascript part is working well enough. The main problem right now is we cannot see any images. That's because the three of them:

images/slide1.jpg
images/slide2.jpg
images/slide3.jpg

are all 404 Not Found. That's because their real filenames are:

images/Slide1.jpg
images/Slide2.jpg
images/Slide3.jpg

with a captal S. Upper and lower case letters in paths and filenames almost always matter on the web, almost never on the local machine. Change them in the HTML code on the page here:


<div id="coin-slider"> <a href="#"><img src="images/slide1.jpg" width="960" height="335" alt="" /> </a> <a href="#"><img src="images/slide2.jpg" width="960" height="335" alt="" /> </a> <a href="#"><img src="images/slide3.jpg" width="960" height="335" alt="" /> </a> </div>

Or rename them on the server to all lower case.

And they should show up. You may have to refresh the page and/or clear the browser cache to see the changes.

There could also be other problems, but this has to be fixed first, and might be the only problem.

pyros
08-08-2011, 04:23 PM
Thank you so much.

Such an easy fix, but i would never of found it.
All done now and working.

Once again thanks! Really appreciate it :)