• Page 1 of 1
  • 1
Forum moderator: bigblog  
How does file distribution work.
rdwray
Posts: 15
Reputation: 0

Message # 1 | 12:36 PM
I have the following folders:
pages - html files
css - css files
javascript - js files

for some reason I cannot load anything but html.

Questions:
Do folder and filenames have to be all lower case characters or just the first?
Is this the correct code for loading css: <link rel='stylesheet' href='../css/Popup.css' type='text/css'>
Is this the correct code for loading js: <script type="text/javascript" src="../Javascript/dom-drag.js"></script>
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 2 | 1:26 PM
rdwray, do you understand what the ../ at the start of those directory links represents? Try discovering the differences between ../ ./ and / when using them at the front of URL paths - it will help you quite a lot when looking at relative paths. smile

As to your issue chances are you'll find the ../ is causing the problem. Read up on the functions of rel paths such as that and see if you can work it out yourself. (I'm an advocate for self-learning especially in development.) Otherwise - if you can't work it out and would rather I have a look at it please provide your site URL. wink

Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
rdwray
Posts: 15
Reputation: 0

Message # 3 | 2:26 PM
This website was uploaded and working for a year and I took it down. I have never worked with uCoz before.

So you do not intend to help. I have been working for days trying to get this website working. If you don't intend to help, then do not reply.
Sunny
Posts: 9296
Reputation: 456

Message # 4 | 2:32 PM
rdwray, Paradox was trying to say that you must use relative links without the dots, e.g.

Code
<link rel='stylesheet' href='/css/Popup.css' type='text/css'>


If it does not help, provide the URL of your website.

I'm not active on the forum anymore. Please contact other forum staff.
rdwray
Posts: 15
Reputation: 0

Message # 5 | 4:51 PM
Sunny, thanks. The relative address that I used was (../) because of the location of the folders being on the same level which worked in "all other" situations except for uCoz. I will give your suggestion a try.

Folders:

Home Page > pages
Home Page > css
Home Page > javascript.

Normally in this situation, the ../ is required for files in the pages folder to find the files in the javascript folder or the direct url.

Added (2014-11-07, 2:38 PM)
---------------------------------------------
Before I write the rest of this, be it known that the file I am referring to is currently residing inside the .html and works.

I did some looking with Firefox and all the files seem to be loading with ../javascript/xxx, but for some reason one of the .js files is not working and I had not noticed it until now. Looks like the programmer sad has got some debugging to do - it is still an issue with uCoz, will just have to keep digging until it is found. In the past I have had issues with the file name being capitalized, but that does not seem to be the case here.

Added (2014-11-07, 3:51 PM)
---------------------------------------------
Doesn't seem to be a solution... I used the absolute path to the files and that did not work, so something inside the script file itself is being blocked somewhere. As long as the script is inside the html, it is fine. Doesn't make any sense that the css and images are being loaded without any problem and the javascript isn't.

Going to leave the script in the html and move on - too much code to try and iron out. If any one like to give it a try, here is the url:Void to Eternity

Cyberdasm
Posts: 640
Reputation: 7

Message # 6 | 10:14 AM
rdwray, try to use only slash its only i use when equipping css and js scripts in my site. (Just like this ="/(enter your folder name but be sure to properly use the name "p" is different from "P")/(your filename).js" <<something like that.

PS. copy the link of the file in file manager if my suggestion will not work.

1F4BF3B
rdwray
Posts: 15
Reputation: 0

Message # 7 | 1:52 PM
Quote dense0293 ()
rdwray, try to use only slash its only i use when equipping css and js scripts in my site. (Just like this ="/(enter your folder name but be sure to properly use the name "p" is different from "P")/(your filename).js" <<something like that. PS. copy the link of the file in file manager if my suggestion will not work.


I have tried:
../
./
/
no slash
copied link

dense0293, I appreciate you replying to these posts biggrin . The issue is that I have preceded the images on all pages, which load, with ../, so what would be different with .css or .js files? Take a look at the source for Void to Eternity and you will see the link for DefaulBG.jpg is ../images.DefaultBG.jpg which is the background for the page.

Added (2014-11-08, 12:52 PM)
---------------------------------------------
Also, if you open the page in Firefox and the go to "source", if the link is good, it will open the file - the files all open in Firefox with ../.

Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 8 | 2:38 AM
rdwray, where are your images uploaded, and where are your JS/CSS files uploaded?

Assuming your file structure is as you have described above you need to be using paths such as:

Code
/css/FILE.css
/javascript/FILE.js


So your code will look like:

Code
<link rel="stylesheet" href="/css/FILE.css" type="text/css">
<script type="text/javascript" src="/javascript/FILE.js"></script>

Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
joexyz
JOE-vascript
Posts: 1768
Reputation: 78

Message # 9 | 10:13 AM
Paradox, yeah... Something like that will not work tongue (apostropheee) biggrin

The correct code:

Code
<link rel="stylesheet" href="/css/FILE.css" type="text/css">  
<script type="text/javascript" src="/javascript/FILE.js"></script>

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
rdwray
Posts: 15
Reputation: 0

Message # 10 | 1:46 PM
Quote bigblog ()
<link rel="stylesheet" href="/css/FILE.css" type="text/css"> <script type="text/javascript" src="/javascript/FILE.js"></script>


Does it not depend on where the files are located? My .css and images load and work with ../, it is just my .js files that "do not work" even through the "do load" - yes they are loading. This website works on my computer set up in the same manor as on uCoz and as far as I know html works the same on the web as on a PC. Something on uCoz is blocking something in the javascript when it is loaded externally.

BTW: This site was running for a year "as is" and as loaded on uCoz.
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 11 | 2:15 PM
rdwray, as I said earlier you should read up on how relative paths function. It'll help you quite a lot. smile

Code
/ = Root Directory
../ = Parent Directory


Otherwise - if your JS files are loading but not functioning then that's a problem with your code, not the platform. I've used JS files on the uCoz system without a problem.

Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
rdwray
Posts: 15
Reputation: 0

Message # 12 | 2:35 PM
The code works when loaded directly into the .html on uCoz and externally on my computer - so what is wrong with the code? uCoz is blocking.
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 13 | 2:40 PM
rdwray, can you provide the exact URL of where the JS is not functioning correctly? I'll look into the issue.
Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
rdwray
Posts: 15
Reputation: 0

Message # 14 | 6:18 PM
Post javascript

Added (2014-11-09, 1:53 PM)
---------------------------------------------
I have to leave in a couple of minutes, but I will be glad to uncomment the files in one of the .html files and you can use Firefox to check and see that the path is correct.

Added (2014-11-10, 5:18 PM)
---------------------------------------------
Paradox, did you give up? biggrin

joexyz
JOE-vascript
Posts: 1768
Reputation: 78

Message # 15 | 7:46 PM
rdwray, on http://vtoe.ucoz.com



on http://vtoe.ucoz.com/pages/grace.html


hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
  • Page 1 of 1
  • 1
Search: