# Solved: Web Page links



## 1951dodge (Nov 17, 2010)

I am fairly new to web pages - so here is my problem. I have made 4 separate web pages with links to a folder which holds all the pictures, gif's and music. The original web page shows all the pictures, gifs etc when opened. BUT the web page that is linked to another web page does not show them "when" the link is open. They do appear when you open the actual web page but not with the link? Does anyone have a clue? Example web page-one with a link to the file holding the pictures:<a href'" http://web page one/webpictures/file.htm"> The linked web page two <A href="http://file.htm> [IMG]web page two/webpictures/file.htm[/IMG]
I could use some help or an explanation of what I am doing wrong. 
Thanks for your assistance


----------



## colinsp (Sep 5, 2007)

Try replacing the spaces in your names for files and folders with underscores.


----------



## 1951dodge (Nov 17, 2010)

I am not sure of what you mean but I do have a couple of the files with spaces "name - name". So I should eliminate the spaces?
I can try that as well.
Thanks


----------



## colinsp (Sep 5, 2007)

in your examples in your original post you have loads of spaces get rid of them. Post your URL then I can have a look at that too to see if there is anything else wrong.


----------



## 1951dodge (Nov 17, 2010)

UNKNOWN GOSS'S This is the link.
The actual web page is http://home.comcast.net/~Smlopes from there you go to C:/Program Files/Web Page-Sheila/unk.htm. My question was and still is - when I go direct to the web page I can see all the gif's pictures etc. but when you use the link, the pictures do no appear? Why.
Thanks for your input.


----------



## allnodcoms (Jun 30, 2007)

Sheila,

Just gone to the link above, and the problem you have is that the images are stored in, and referenced by "C:/Program Files... Etc, etc". Your live pages, stored somewhere out there on the internet, can't access your local hard drive so they return 404 (not found).
Upload your images to your web host and update the relative links to point at the new files... That should do the trick!

Danny


----------



## 1951dodge (Nov 17, 2010)

OK, you got me. I have uploaded/downloaded the -file Webpictures to each site on every one of my host pages. How do I update the links to see the file "webpictures" if it is already on the host? The C:/Program Files gives a refernence to the files I want to show - do I eliminate that? If so how?
Is there another way to get the web page open without a reference to C:/Program Files?


----------



## colinsp (Sep 5, 2007)

Sheila

What editor are you using to create your web pages?

How are you uploading your files to your webhost?

Until we know the answers to this I only have one suggestion

Download the free editor Notepad++
Upload your photos to http://home.comcast.net/~Smlopes/images/
Open each of your html pages in Notepad++ and do an edit and replace 

```
C:/Program Files/Web Page-Sheila/webpictures/

with 

http://home.comcast.net/~Smlopes/images/
```


----------



## 1951dodge (Nov 17, 2010)

I will try that for the links but I believe the web page I am in need the C:/Program Files to find the file with the pictures.
I use CSE editor it is a good program. My host is comcast and I upload using FTP. I have no problems with the host or uploading. The Web pages work but it is the link that appears not to.
I will edit the index page to see if that corrects the problem.


----------



## tomdkat (May 6, 2006)

1951dodge said:


> I will try that for the links but I believe the web page I am in need the C:/Program Files to find the file with the pictures.


You might need that to see the files on YOUR computer but the problem is, that location won't be valid once your files are uploaded to the server.

What I suggest doing is creating an appropriate directory structure to hold the images. Then, you can use a relative URL, like "images/" to view the images you want to see.

I can work up an example, if that will help. 

Peace...


----------



## 1951dodge (Nov 17, 2010)

I was going to show you exactly what I have but I can't copy the PDF file or convert it to show you -so I will try to type what works on each web page and what doesn't so far.
<a href="pgoss1.htm">







This gets me to Peter Goss page with background, gif's etc. (All my files are in Webpictures-Gif's, jpg's and music)
This link doesn't work - < a href="http://home.comcast.net/~Dplopes/index.htm">







It does get me to the web page but none of the gif's appear. If I just go directly to the site <a href="http://home.comcast.net/~Dplopes/index"> everything works?
Am I making the correct link? I know I am missing something small but what I don't know.


----------



## tomdkat (May 6, 2006)

Your links are to specific files, like "index.htm" or "down.jpg". You need to link to directories.

So, let's say your HTML files are in the same directory or folder and the images are in a sub-directory, or sub-folder, of where the HTML files are. Then, the links to the images would be like this:

<a href="http://forums.techguy.org/images/">

or

<a href="http://forums.techguy.org/images/gifs">

Then, the "raw list" of images should appear. I can work up an example and post a link so you can check it out. 

EDIT: Ok, here is a link to my example:

http://www.tomdkat.com/techguy/links/links-example.html

Here is the HTML:

```
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Links example</title>
</head>
<body>
<h1>Here are some links to image directories:</h1>
<h2>[b][color=red]<a href="http://forums.techguy.org/images/beach/">[/color][/b]Beach images[b][color=red]</a>[/color][/b]</h2>
<h2>[b][color=red]<a href="http://forums.techguy.org/images/cars/">[/color][/b]Car images
[b][color=red]</a>[/color][/b]</h2>
</body>
</html>
```
So, on the *server*, there is a directory called "images" and INSIDE the "images" directory are two directories, one called "beach" and one called "cars". This makes it easy to access the directories of "raw" images without having to worry about where files are located on MY computer.

Does this make sense?

EDIT #2: For some reason, "http://forums.techguy.org/" is being injected into my post above. If you look at the "raw" HTML in the live page, you can see the HTML I'm trying to post here. 

Peace...


----------



## 1951dodge (Nov 17, 2010)

I can only say that I need to learn HTML. What I am trying to do is link my web page to another web page, My directories are: web page-don, web page-sheila, web page-NF families and web page-goss. In each directory I have a folder "webpictures".
My original web pages work with the long direcotry and index.htm reference, each page shows all the images I put into them. But when I use a link to the same web page like "web page-don" from the "web page-sheila" the images do not appear. That is what I am trying to correct. Does "/" this do something I should be aware of?
Thanks for your patience


----------



## tomdkat (May 6, 2006)

So, you have a structure like this:

web-page-don/webpictures
web-page-sheila/webpictures

If you're viewing pictures on a page in, say "web-page-sheila/webpictures" and you want to link to a page in "web-page-don/webpictures", code the link like this:

Go to Don's pictures

Notice the "../../" before the "web-page-don". That's called a "relative URL" and coding your links like that should solve your problem.

I can't post an example of this tonight but I can tomorrow, unless someone else jumps in and takes over.

EDIT: In the above example, please *replace* "http://forums.techguy.org/" with "../"

Peace...


----------



## WendyM (Jun 28, 2003)

Hi Sheila,
There are two separate issues. The concept that you're struggling with (and lots of people struggle with when they create websites) is the difference between your computer and the server. All of the pages and images are on your computer and they can "see" each other because they're in the same place. But when you upload pages to the server, they can no longer see the images on your computer, because now the images and the pages are in a different place. So when you go to one of your webpages on your computer (C:/Program Files, etc) all of the images are there, but when you go to one of your pages on the Internet (home.comcast.net/etc) the pages are there because you uploaded them but the images are not. So there are two different things you need to do to make it work. The first is to upload the images and the second is to fix the links.

When I go to your site, if I look at home.comcast.net/~Smlopes/Web Page-Sheila/Webpictures/stpat.jpg (as an example of one image) it's not there, which tells me the images are still just on your computer. Have you used FTP to upload all of your Webpictures folders to Comcast? Once you do that, then Tom can continue to walk you through changing the links or one of us can.


----------



## 1951dodge (Nov 17, 2010)

First - Wendy, thanks for your input. I have uploaded all the images in a folder "Webpictures" for each web page. When I type in the http://home.comcast.ner/~Smlopes I thought all of the images appeared. When on that web page and I try my links to my other web pages, I can connect to the web page but my Images do not appear (the gif's and flags etc) but the web page is there. I have used FTP to upload all the image files (folder). When I checked they were all there in the folder on the Host page. So Now I will try Tom's suggestions. We learn somethingnew everyday and this is new.
Thank you both for the input.


----------



## 1951dodge (Nov 17, 2010)

How do I get rid of the C:/Program Files. I know in the past I didn't use that and everything worked fine.
But that is the Directory on my computer. "Webpictures" is the folder of pictures, gifs and jpgs I put into each of the Web pages and uploaded to the host site. They are on the host site as are the htm,s for the web page.
What am I missing? Thanks for your help, but each attempt I have tried doesn't wotk to date.


----------



## colinsp (Sep 5, 2007)

If you look at line 63 in your index.html file you will see this line of code


```
alink="#0000ff" background="C:/Program Files/Web Page-Sheila/Webpictures/bluesky.jpg" lang="EN-US" link="#660099" text="#000000" vlink="#0000ff"><font face="courier new" size="3"></font>
```
Change this line to


```
alink="#0000ff" background="http://home.comcast.net/~smlopes/Webpictures/bluesky.jpg" lang="EN-US" link="#660099" text="#000000" vlink="#0000ff"><font face="courier new" size="3"></font>
```
Then save the change.

FTP this new index.html file to your server. You should now see your page with the blue sky background. If you don't then you still have something wrong with where you have FTP your image files to on your server and you will need to correct that. Don't forget that your server has case sensitive folder and file names so Webpictures is different to webpictures and Bluesky.jpg is different to bluesky.jpg.

Once you have your page correctly displaying the background then go through and change all the references to c:/program files etc to your correct new location.

This should definitely work because if you go to http://home.comcast.net/~smlopes/Webpictures/bluesky.jpg you will see your bluesky picture.


----------



## 1951dodge (Nov 17, 2010)

Thanks for your response. I can't believe the trouble I am having with this project. I am going back to the old files to see what has changed beside the "C:/Program Files" reference. I added buttons and they didn't work unless I did the C:/Program Files but all the other links did. Now that I changed that the links work but it doesn't find the folder with the pictures.
I will give that a shot today and see what happens.
Thanks again, Don


----------



## 1951dodge (Nov 17, 2010)

I would like to thank all who helped with My problem. Calinsp, WendyM and Tomdkat.
I will brush up on Html so I do not try to make web pages using my computer instead of the URL. Once I got one fixed the others were simple. Now I get to work on a few bugs left, probably small stuff like "Capitals" versus small letters, a comma versus a period. You know the kind of things we all miss.
Thank you all for your help - My web pages now work like thet are supposed to.


----------



## JiminSA (Dec 15, 2011)

I realise that you've marked this as solved and what I am pointing out was probably not part of your original html code, but ...


> The linked web page two <A href="http://file.htm>
> 
> 
> 
> ...


... you omitted a double quote at the end of your href statement ...
it should read/have read 

```
<A href="http://file.htm"> [IMG]web page two/webpictures/file.htm[/IMG]
```


----------



## 1951dodge (Nov 17, 2010)

Thanks for the input but as you can see even my examples of what I was doing were wrong. I have the web pages working now by getting rid of the C:/Program reference "which was totally wrong" and now I am down to nitpicking the pages to correct errors of omission or spelling.
But I thank you anyway - it is amazing to me that so many people are willing to help. Someday I may be in that position and I will remeber all the help I received.


----------



## WendyM (Jun 28, 2003)

:up: Glad you got it sorted out. Good luck and don't be afraid to ask if you have more questions. It's how we all learn.


----------



## JiminSA (Dec 15, 2011)

Yup, I totally concur with WendyM - in addition my personal learning curve has increased with the helpful and polite input from TSG members - a good bunch


----------

