Quantcast

I've screwed up my website...

UKworkshop.co.uk

Help Support UKworkshop.co.uk:

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,757
Reaction score
93
Location
Kirkby-in-Ashfield
OK, I know a little knowledge is a dangerous thing, and true to form I've screwed up my website.

Can someone please explain to me something very simple? How do I refer to files relative to the root directory?

I know that ../ means go up one, so ../.. must mean go up two levels, but it starts to get a bit cimbersome.

I have some main pages (index, FAQs etc) at top level, but all my interesting pages (gallery, resources) are lower down:

/gallery/lounge/lounge.htm and subdirectories of images.
/gallery/bedroom/ bedroom.htm and subdirectories of images, etc

and in resources:

/resources/tenon_jig/tenon_jig.htm plus relevant JPGs

I'm happy with the structure, but the problem is the menus. The menu files are in /images/navbar, so the relative path is horrible. Much easier just to point to /images/navbar/JPGs. Trouble is, although it works on my PC, when I upload it, it looks for ntlworld.com/index instead of ntlworld.com/steve.maskery/index.

Are you still following this? Bravo! How do I fix this please? Do I have to add /steve.maskery to the beginning of all my pathnames? There is a lot of them! And I'm pretty sure it won't work on my local PC if I do that.

I'm using DreamWeaver.

All and any help very gratefully received.
Cheers
Steve
 

tim

Established Member
Joined
5 Nov 2004
Messages
2,307
Reaction score
0
Location
Herefordshire
Steve,

I can't help I'm afraid - this is one thing that I farm out - no luddite, just not an expert. If you get no help here let me know and I'll ask the guy doing mine.

Cheers

Tim
 

Midnight

Established Member
Joined
11 Oct 2003
Messages
1,805
Reaction score
0
Location
Scotland
Sorry to hear that Steve..

likewise.. I canna help you I'm afraid.. canna even remotely claim to be a geek...

hope your solution's quick and easy though...
 
A

Anonymous

Guest
"It depends" is the truthful answer.

If the content you want to access is outside of the scope of the web site, then the web server is likely to slap your wrists and prevent you getting to those files.

However if the content is within scope of the web site (as in beneath the home directory of the web site for example) then a new question comes to the for. What type of web server is it? Microsoft IIS or Linux based?

Microsoft IIS will require you to use the server.mappath() method to get to an absolute location on the hard disk.

Linux will require you to ask someone else, 'cos I don't have a clue.

Andrew
 

Chris Knight

Established Member
Joined
14 Jan 2004
Messages
6,641
Reaction score
1
Location
SE London - NW Kent
Steve,

I am not at all sure I understand your question. A relative path is relative to where you are rather than the root directory. From the root directory you will be specifying more of an absolute path.

For example to refer to the root directory from a couple of levels down a menu item might look like this

<p align="center" class="style1"><a href="../../index.htm">Home</a></p>

To refer to the same directory from the top level (going the other way, I need something like this

<td><a href="woodwork/carving_tool_box/index.htm"><img src="carving_tool_box.jpg" width="150" height="100" border="3"></a></td>

In the latter example, I have specified each directory on the route to the item I need to point to (how else will the server "know" where I want to go). Coming the other way the dot notation works because "up a level", or "root" is always up a level or root.
 

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,757
Reaction score
93
Location
Kirkby-in-Ashfield
waterhead37 said:
To refer to the same directory from the top level (going the other way, I need something like this

<a href="woodwork/carving_tool_box/index.htm">
Yes, Chris, but am I not right in thinking that this is only down from where I am, rather than from the top? If I am already in "woodwork" doesn't this then point to "woodwork/woodwork/carving_tool_box/index.htm"?

Or am I mistaken?

Handy, I haven't a clue what the server is! How do I find out?

Thanks guys,
Cheers
Steve
 

Alf

Established Member
Joined
22 Oct 2003
Messages
12,079
Reaction score
0
Location
Up the proverbial creek
waterhead37":2uw6dme8 said:
Coming the other way the dot notation works because "up a level", or "root" is always up a level or root.
Ooo, that's clever. Never realised that.

Steve, sorry, I only know enough to be dangerous to my own website. I'm in the throes of trying to tweak it a bit at the moment, so I feel your pain. :(

Cheers, Alf
 

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,757
Reaction score
93
Location
Kirkby-in-Ashfield
Chris
Are you saying that ../.. is always Root, and not just "up two levels"?

If so that will solve my problem, I think.

As it is it is taking /images to be in the root of ntlworld.com, rather than MY root, steve.maskery.

Perhaps I should say that this is actually the pathnames of JPGs which is scrweing up, but I guess the same principle applies.
Cheers
Steve
 

Chris Knight

Established Member
Joined
14 Jan 2004
Messages
6,641
Reaction score
1
Location
SE London - NW Kent
Steve,

My second example was from the top (root), pointing to a directory called woodwork, inside which was one called carving_tool_box inside which was the file index.htm

You shouldn't have to worry about server configuration. If your server is a Linux or Unix box which is the most popular kind amongst web hosting companies, then your view of the site from outside (accessed via a public browser) will always start looking in a directory called "public_html" this is root as far as any url is concerned. A browser can't access directories on the same level as this one with an http url (you also have a public_ftp directory but that is another story)

If you are trying to configure a database rather than an address for web pages (they are similar) then your root directory will be generally known as "home" thus my root directory path to a genealogy section on my site is "/home/chriskn/public_html/genealogy/"
 

Chris Knight

Established Member
Joined
14 Jan 2004
Messages
6,641
Reaction score
1
Location
SE London - NW Kent

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,757
Reaction score
93
Location
Kirkby-in-Ashfield
Chris
Thanks very much. You have confirmed what I feared - I've got my knickers in a twist.

At least all my difficulties are in the template areas, so if I can just get them sorted, everything else should drop into place.

Thanks for your help,
CHeers
Steve
 

mudman

Established Member
Joined
11 Feb 2004
Messages
881
Reaction score
0
Location
Trying to stay in one piece in South Wales
Steve Maskery":q23gbpip said:
Chris
Are you saying that ../.. is always Root, and not just "up two levels"?

If so that will solve my problem, I think.

As it is it is taking /images to be in the root of ntlworld.com, rather than MY root, steve.maskery.

Perhaps I should say that this is actually the pathnames of JPGs which is scrweing up, but I guess the same principle applies.
Cheers
Steve
Steve,

../ is always up one level and you need to repeat this as many times as levels you want to go up. This can get very bulky if you have a very deep directory structure. One option is to keep everything very 'flat' that is all folders come off of the root and none of them have sub folders. Of course you can vary this but I think that a good idea is to group pages within folders that come directly off of the root. That way you only ever need to go up a level before going into another area.

You are using the single slash '/' to denote the root directory. Trouble is that this can be a bit hit and miss and if you don't have your own domain name it is likely to cause problems. It also won't work on your home PC unless you run it through a Personal Webserver, (not sure if Dreamweaver acts like one).
 

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,757
Reaction score
93
Location
Kirkby-in-Ashfield
Well most of it is sorted now, thank you all for input.

I have a 98% functioning website. Trouble is, the bits that don't work are important! I have a few links that don't link, and I don't know why. The invitation to Email Me in the FAQs section works, but an apparently identical section of code on the Index page doesn't.

Similarly HREF links to Brimarc and this Forum work, but links to GW and Chestnut don't. The code looks identical, and I can't figure it out. But my brain hurts, so it will have to stay like that until I can face another session.

I'm just pleased to have got it in this shape, I started it before Christmas! I think I'll go off to the gym for a couple of hours.

Cheers all,
Steve
 

Chris Knight

Established Member
Joined
14 Jan 2004
Messages
6,641
Reaction score
1
Location
SE London - NW Kent
Steve,

I doubt the code is identical if one works and the other doesn't. I suggest you cut and paste both bits of code into a blank html page and check. Then just to be sure upload your test page and try the links.

I suspect it's something like a missing pair of quote marks, or an error in the url.
 

mudman

Established Member
Joined
11 Feb 2004
Messages
881
Reaction score
0
Location
Trying to stay in one piece in South Wales
Steve,

You have a slight problem with layers.
There are navbar and body layers defined with a z-index of 2 which is putting one on top of the table that holds all the links which has a negative one that means it goes to the bottom of the heap. The top two are effectively 'covered' by the layer and means you can't click on it, (you can see them still as the layer is transparent). You can click on the lower items as they are below the bottom of the layer and so aren't covered by it.
I don't know how Dreamweaver does it, but I suspect there will be a command somewhere to 'Send layer to back' or somesuch.
If you edit the file by hand though, you will see the following couple of lines:

Code:
    <td width="572" rowspan="4"><div id="BodyLayer" style="position:absolute; width:564px; height:418px; z-index:-1; left: 210px; top: 224px;"><!-- InstanceBeginEditable name="Body" -->
      <div id="BodyLayer" style="position:absolute; width:560px; height:293px; z-index:2; left: 3px; top: 2px;">
Swapping the values for each z-index makes the links clickable.

Edited to make it right.
 

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,757
Reaction score
93
Location
Kirkby-in-Ashfield
Mudman for Prime Minister!!!

I owe you a very, very large pint!
Thank you. I would never have found that in a month of Sundays.

Cheers
Steve
 

Newbie_Neil

Established Member
Joined
27 Jul 2003
Messages
6,537
Reaction score
0
Location
Nottingham, England
Hi Steve

Barry has just pm'd me and said that you can ply me with beer instead as he lives too far away. :wink:

Cheers
Neil
 

Chris Knight

Established Member
Joined
14 Jan 2004
Messages
6,641
Reaction score
1
Location
SE London - NW Kent
Steve,
Doh! I did not even look at your new site - hadn't realised you had it under the www button :oops:

I have just had a quick look and it appears that many pages don't work in Firefox but do in IE (like http://homepage.ntlworld.com/steve.mask ... er_jig.htm)

If you are concerned about Firefox and Netscape users not being able to view your pages then you need to do a browser compatibility check in Dreamweaver. This is under the File menu - Check Page - Check Target Browsers

IE is still the most popular browser by far but Firefox is quickly becoming popular and has a significant user base.
 

mudman

Established Member
Joined
11 Feb 2004
Messages
881
Reaction score
0
Location
Trying to stay in one piece in South Wales
<Big blushing smilie>

Oh, 'twas nothing. Glad to be of help. :D

Neil, I said nothing of the sort! I would never give away good beer.

Anyway, I reckon what goes around comes around and I'll be looking for the advice next time.
 

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,757
Reaction score
93
Location
Kirkby-in-Ashfield
Chris,
I am aware that there are browser issues with Netscape, had't realised Firefox was trouble as well. Never even seen it let alone used it.

As you can tell from this thread, I'm not an experienced web designer (although considerably more experienced than I was 2 months ago!), so I'll take it one step at a time, I think.

I will check out stuff for other browsers, but probably not just yet. I've really just about had it with IT, at least for a while.

Added to which, I've got some timber arriving tomorrow morning :) !

Thank you very much for your input.

Kindest regards
Steve
 
Top