Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ link code not working

Posted by: Dick Roose Aug 16 2010, 12:12 AM

Hi All,

I have got my first problem solved but had to learn a lot more than I wanted to.

Although the attached code looks correct to me, it doesn't work. Can anyone tell me why?


Thanks

The single most important criteria for all human decisions is ...
"Is it good for Earth's children?"

Dick Roose


Attached File(s)
Attached File  link_test.htm ( 1.13k ) Number of downloads: 318

Posted by: pandy Aug 16 2010, 12:21 AM

Hi smile.gif

It's because NAME doesn't exist as an element. It's an attribute for A. Like this:

HTML
<h2><a name="chp1">Introduction</a></h2>


There's no need to use named anchors anymore though. The browsers that need them are so old now, that you can safely ignore them. You can give the H2 an id and link to it in the way you already do.

HTML
<h2 id="chp1">Introduction</h2>

Posted by: Dick Roose Aug 16 2010, 04:26 AM

Hi Cicero,

Thank you very much for taking the time to solve part of my problem. I really appreciate it. But ...

The code works fine in the link test.htm. Each time I click on the list the screen jumps as it is supposed to jump.

So I copied the code into the Mainpage.htm which is where I need it. It doesn't work!

Next I tried "copying" the three anchors from the working program to the non working program, along with the three list statements. I made the link test program by coping the statements also.

Well would you believe with identical code for the three first menu items, they don't work in the mainpage program.

It is identical because I "copied" it! I am hoping someone can point out my error. I have run "Tidy" several times with no errors reported.

If you look at the problem, you can find all the anchors by searching for "<h2>." The menu list is almost at the very end of the file.

Any help will be greatly appreciated wub.gif . I need this web site done last week.

Thanks

The single most important criteria for all human decisions is ...
"Is it good for Earth's children?"

Dick Roose


Attached File(s)
Attached File  mainpage.zip ( 85.55k ) Number of downloads: 170

Posted by: Frederiek Aug 16 2010, 05:08 AM

Which links don't work? They seem to work for me. I didn't click them all, but quite a few.

You still have that problem with the TOC not being in the right place and not scrolling with the content.
Change <p class="rvps2"> to <div id="toc">, get rid of the associated closing </p> and close the div after the closing div of the list (which has class="toc", so you'll have two closing div's there.

So it will look like this:

CODE
<div id="toc"><span class="rvts6">Table of Contents<br>
</span>
        <div class="toc">
                <ul>...your list here...</ul>
        </div>
</div>


Then style the new div:
CODE
#toc {
        position:fixed;
        top:30px;
}

Posted by: Dick Roose Aug 16 2010, 05:17 AM

QUOTE(Frederiek @ Aug 16 2010, 05:08 AM) *

Which links don't work? They seem to work for me. I didn't click them all, but quite a few.


Do you mean that you unzipped the mainpage file, ran it in a browser and all the links you tried worked. Could you try it at (http://realityfound.org), it is the same code!

Thanks

The single most important criteria for all human decisions is ...
"Is it good for Earth's children?"

Dick Roose

Posted by: Dick Roose Aug 16 2010, 05:33 AM

[quote name='Dick Roose' date='Aug 16 2010, 05:17 AM' post='50228']
[quote name='Frederiek' post='50227' date='Aug 16 2010, 05:08 AM']
Which links don't work? They seem to work for me. I didn't click them all, but quite a few.
[/quote]


Hi Frederiek,

I am quite excited that the menu worked for you and I would like to know what you are doing differently.

If you will send me an email with your phone number I will give you a call; or perhaps we can chat via email?

dcroose@comcast.net

Thanks

"Is it good for Earth's children?"

Dick Roose


Posted by: Frederiek Aug 16 2010, 09:17 AM

You are right, on line, the links don't work, probably because they are behind the first table column.

Yes, I d/l the zip file, where the menu was at the bottom of the page, but they did work (Safari/Mac). (Of course, I didn't have the external CSS file). Then I made the few changes I mentioned, so they would scroll with the page (with position: fixed). And voilą. I don't know if the external CSS interferes here.

Mostly, discussions are kept public in the forums, so others can benefit from them. But, if you wish, you can send me a PM.

Posted by: Dick Roose Aug 16 2010, 10:42 AM

QUOTE(Frederiek @ Aug 16 2010, 09:17 AM) *

You are right, on line, the links don't work, probably because they are behind the first table column.

Yes, I d/l the zip file, where the menu was at the bottom of the page, but they did work (Safari/Mac). (Of course, I didn't have the external CSS file). Then I made the few changes I mentioned, so they would scroll with the page (with position: fixed). And voilą. I don't know if the external CSS interferes here.

Mostly, discussions are kept public in the forums, so others can benefit from them. But, if you wish, you can send me a PM.


Thanks Frederiek,
You told me what I need to know. I just could not believe that you unzipped it and it worked, and you didn't just unzip
it. I went PM because I didn't want to wait for a posting to get to you, you might not check the site for days.

Thanks again
The single most important criteria for all human decisions is ...
"Is it good for Earth's children?"

Dick Roose


Posted by: pandy Aug 16 2010, 11:29 AM

Threads merged. But who is Cicero? smile.gif

Posted by: Frederiek Aug 16 2010, 12:17 PM

Dick,

When you (or anyone else) sends me a PM, I get notified of that by email. And normally, I pass by in the forums, at least once a day, anyway.

I haven't had one from you, if that's what you wanted to do. You know how it works? Just click on my name on the left, which leads to my profile. There, you'll find a link called "Send a Personal Message" and you'll be presented with a form to fill in.

Posted by: Christian J Aug 16 2010, 04:21 PM

QUOTE(pandy @ Aug 16 2010, 06:29 PM) *

who is Cicero? smile.gif

A famous moderator. happy.gif

Posted by: pandy Aug 16 2010, 04:45 PM

rolleyes.gif

Posted by: Dick Roose Aug 17 2010, 11:13 AM

QUOTE(pandy @ Aug 16 2010, 11:29 AM) *

Threads merged. But who is Cicero? smile.gif


Sorry panda, I am 74 and sometimes I make mistakes. Don't know where I got Cicero!

The single most important criteria for all human decisions is ...
"Is it good for Earth's children?"

Dick Roose

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)