Forum Moderators: open

Message Too Old, No Replies

Help! Cant get this page to link...

         

BobSprocket

11:17 pm on Apr 14, 2005 (gmt 0)

10+ Year Member



This problem must be a really stupid thing I am doing. I am just starting to build my main webpage on my Internet Explorer browser.

On the main page, I have some anchor text w/ a link to another html document: chapter 2: Widgets.

No matter what I do, the chapter 2 document does not come up when you click that link. Chapter 2 is an html document in the same folder as the main page of the website.

I tried using a different document to link to. I went back to the source code instead of

<a href="chapter2.html">

I paste in:

<a href="chapter1.html">

and the link works fine (for chapter 1)

I tried changing the title of the document, instead of chapter2 I called it chaptertwo.html. Still no work.

I went to different click on sections of the main page and stuck in a link to chapter2. THese links will not open either. Although they are fine when they link to other html documents in the same folder.

What the heck is going on here? it is probably somethign stupid, I am new to this...

andmunn

2:10 pm on Apr 15, 2005 (gmt 0)

10+ Year Member



According to what you said, it should work fine.

Are you sure your file was saved as "chapter1.html" - it could perhaps of been saved as "chapter1.htm" and thus would not show up. Id's recommend opening up the HTML file (chapter1.html) in a text editor (notepad) and saving it as "chapter1.html" and then uploading this to the same folder your main site is on.

It should be working :)

Alternative Future

2:16 pm on Apr 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried right clicking on the link text i.e. <a href="chapter1.html">Chapter 1</a> in the browser and checking the full address (URL) path copying it and pasting it into the browser address bar. Also might be worth checking the file type.

-George

BobSprocket

1:57 am on Apr 17, 2005 (gmt 0)

10+ Year Member



I did check the file type and it was an html file. So were all the rest.

I did try right clicking and trying to open it. Still no go. I am not sure about the other suggestion, to try right clicking and checking the path. I was looking at the path name as it came up, didnt think to double check it.

I finally got the thing to work in the most clumsy workaround imaginable. I copied the entire code into another html doc that was working. So the only thing different was the title. That worked. Then I changed the title back to what I wanted, so it works now.

Very strange. Still scratching my head.

BobSprocket

2:08 am on Apr 17, 2005 (gmt 0)

10+ Year Member



Bizarreness continues. I still had one of the old, non-working document files left over so I opened the "properties" of the one that works (startwidget.html) and compared it ot the one that doesnt work (chapter3.html).

THey both look the same except that for the one that opens, at the bottom of the properties box it says "unblock" and "files were sent from another computer and security reasons.."

Doesnt seem to be the problem, I hit the unblock box and the file continues to open correctly.

Could it be the use of a numeral e.g. "3" in the title? I am stumped.

BobSprocket

2:18 am on Apr 17, 2005 (gmt 0)

10+ Year Member



Also I dont understand what alternative is saying here:

"Have you tried right clicking on the link text i.e. <a href="chapter1.html">Chapter 1</a> in the browser and checking the full address (URL) path copying it and pasting it into the browser address bar."

you mean when I am in the main page (i.e. the page that has link text). I can right click on the link text and there is a command called "copy short cut". So I copied it and pasted it into the source code. STill no go.

Is that what you mean? Because otherwise I cant just copy the URL from the window because the URL only remains there as long as the cursor is over that link, when I move the cursor the URL disappears..

tedster

4:13 am on Apr 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think he means right click on the link, copy the shortcut to the clipboard, and then paste it in the browser's address bar so you can read it exactly as your browser is handling it.

I'm also wondering about your link syntax - do they all look like this:

<a href="page.html">LINK TEXT HERE</a>

One of the quotes may be missing, for instance. Or perhaps the </a> to close the anchor tag. At any rate, I strongly sugggest you validate the html page at the W3C.

W3C Validator - HTML [validator.w3.org]

Chico_Loco

5:48 am on Apr 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<a href="chapter1.html">Chapter 1</a>

Something which can sometimes be overlooked unless you pay extra attention - be sure you are keeping the file name reference inside the quotes in the same case (UPPER/lower) as that in which the file was saved.

"Chapter1.html" is NOT the same as "chapter1.html".

BobSprocket

10:56 pm on Apr 17, 2005 (gmt 0)

10+ Year Member



it can't be a problem with an anchor tag or quotes, since when I put in the name of another doc. into the same section of the code, it opens just fine! It's bizarro.

I appreciate the link to the html validator, this I will try next. thx.

larryhatch

11:51 pm on Apr 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had a similar problem when my host ISP switched servers.
The new servers ran under UNIX which is CASE SENSITIVE.
The old servers were case INsensitive so that Alfa.html
was treated just like aLFA.html

It all cleared up once I made sure the file names and extensions
were consistently spelled with regard to CASE. -Larry

BobSprocket

3:46 am on Apr 18, 2005 (gmt 0)

10+ Year Member



Okay I tried to do the html check but I got this error message:

"No DOCTYPE Found! Falling Back to HTML 4.01 TransitionalA DOCTYPE Declaration is mandatory for most current markup languages and without one it is impossible to reliably validate this document. I am falling back to "HTML 4.01 Transitional" and will attempt to validate the document anyway, but this is very likely to produce spurious error messages for most non-trivial documents."

Now what do I do next?

tedster

4:16 pm on Apr 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can (and eventually will be better off to) add a doctype. You would probably begin by using HTML 4.01 anyway, so look and see - are there any error messages after that warning on the W3C validator?

Note: if you add a complete doctype, modern browsers will swtich into "standards mode" for rendering your page. Without a complete doctype you are seeing quirks mode rendering. So adding a full DTD may break your layout in unexpected ways.

With this in mind, for now, I'd suggest using a partial doctype as the first element of your HTML document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

If you want to get into the whole area of quirks and standards (you will eventually) use the complete DTD:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

And when you are ready, you can start learning about the whole thing by reading this thread:
Quirks Mode and Standards Mode [webmasterworld.com]

As a final reference, here is the W3C list of valid DTDs:
[w3.org...]

scottmack

6:32 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



Start over.
Rename the chapter2 file to:
aaa.html

On your main page, type in:

<a href="aaa.html">Go to Chapter 2</a>

Put main page and aaa.html in the same directory

BobSprocket

7:53 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



Scott: I just tried doing that. It doesnt work, the link doent open. Nothing happens. As I said above, I got it to work by actually importing the source code into a doc. that did open, and then changing the name of the doc...

***

Okay I went back to my source code and added the DTD statement. THere are lots of errors or whatever, over 100.

Should I go back and attempt to fix all this? WHy? I started my web page by plagiarizing it from a web page with layout that I liked. This web page has not DTD in it.

I took that web page and stuck it into the W3C validator and it produced a bunch of errors or whatever. But despite this, their page is working fine for most/all browsers.

Are you telling me, now I have go fix all these errors? Why? The page I borrowed it from is working fine with all these errors/whatever.

tedster

8:26 pm on Apr 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I got it to work by actually importing the source code into a doc.

What software are you using, all together? A .doc is not a good place to be working with html source code - word processing automatically adds too many things which you could easily miss, like smart quotes, for instance.

For working directly with HTML or CSS source code, you want a plain text editor or an HTML editor, not a word processing application.

Also, if all you care about is that the page looks right in the browser you are using (Internet Explorer, I assume, either 5.5 or 6) then you can ignore the errors and just test your page by eye. However, this approach can give some really dicey results on other browsers and user agents. Don't forget that a search engine spider is a kind of user agent! You probably care that tghe search engines see all your content, exactly as you intended it.

There is a reason for the standards - and although it is a bit of learning curve, I do recommend that everyone begin to get a handle on how to write valid HTML. Explorer has elaborate error recovery routines built in and apparently your errors are not "too much" for it to handle - or you may even be depending on those routines for getting the look you want. But with standards-compliant mark-up you are not counting on any particular browser's internal error recovery.

Who knows if the next version of Explorer (7.0 later this year) will handle non-standard code in exactly the same way.

BobSprocket

8:57 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



OH perhaps I misspoke. These are html files; not docs.

I am working the source code in Note Pad.

BobSprocket

9:01 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



the browser is Internet explorer, yes. Not sure what version, its pretty recent though.

tedster

9:48 pm on Apr 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What more can we say Mr. Sprocket? Just to be methodical, and check each step. You are creating plain old html anchor tags here - there is no bug around that part of HTML in any browser -- hyperlinks are the back-bone of the web.

So know that there must be an error in the mark-up, or a typo in the file name, or perhaps the file is not in the directory that the path points to. Something is wrong there, and you just need to track it down.

BobSprocket

9:24 pm on Apr 19, 2005 (gmt 0)

10+ Year Member



what more can we say?

I dunno. I have no idea, I am new to this. That's why I am asking. The directory thing is my next thought. I think I am going to clean out all the unusable files out of that folder and see if that changes things.

scottmack

10:33 pm on Apr 19, 2005 (gmt 0)

10+ Year Member



Is there some code near the top of the document like:

<base href="http://www.somesite.com">
If there is a line with BASE HREF, delete it.

1- put mainpage.html in a directory
2- put ch2222.html in the same directory as mainpage.html
3- on mainpage.html, type:

<a href="ch2222.html">Ch 2</a>

BobSprocket

9:59 pm on Apr 21, 2005 (gmt 0)

10+ Year Member



thanks for all your help. I will let you know if I ever figure uot what the heck happened.