|
|
Forum moderator: bigblog |
uCoz Community For Webmasters Custom Solutions How does file distribution work. |
How does file distribution work. |
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> |
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.
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. Jack of all trades in development, design, strategy.
Working as a Support Engineer. Been here for 13 years and counting. |
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. |
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.
|
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) Added (2014-11-07, 3:51 PM) |
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, 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 . 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) |
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. |
Paradox, yeah... Something like that will not work (apostropheee)
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 |
<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. |
rdwray, as I said earlier you should read up on how relative paths function. It'll help you quite a lot.
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. |
Post javascript
Added (2014-11-09, 1:53 PM) Added (2014-11-10, 5:18 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 |
| |||
| |||