The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> link code not working, cannot get menu links to jump to different sections of same page
Dick Roose
post Aug 16 2010, 12:12 AM
Post #1


Newbie
*

Group: Members
Posts: 11
Joined: 11-April 09
Member No.: 8,289



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

This post has been edited by Dick Roose: Aug 16 2010, 12:21 AM


Attached File(s)
Attached File  link_test.htm ( 1.13k ) Number of downloads: 98
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 16 2010, 12:21 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 14,915
Joined: 9-August 06
Member No.: 6



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>


--------------------
"Never go to excess, but let moderation be your guide."
- Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dick Roose
post Aug 16 2010, 04:26 AM
Post #3


Newbie
*

Group: Members
Posts: 11
Joined: 11-April 09
Member No.: 8,289



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

This post has been edited by Dick Roose: Aug 16 2010, 04:56 AM


Attached File(s)
Attached File  mainpage.zip ( 85.55k ) Number of downloads: 74
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Aug 16 2010, 05:08 AM
Post #4


Programming Fanatic
********

Group: Members
Posts: 4,124
Joined: 23-August 06
From: Europe
Member No.: 9



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;
}


--------------------
"The earth does not belong to us. We belong to the earth."
from Vue du ciel (in French)

"Leave scepticism to others and take action"
from HOME by Goodplanet

An inconvenient truth by Al Gore
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dick Roose
post Aug 16 2010, 05:17 AM
Post #5


Newbie
*

Group: Members
Posts: 11
Joined: 11-April 09
Member No.: 8,289



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dick Roose
post Aug 16 2010, 05:33 AM
Post #6


Newbie
*

Group: Members
Posts: 11
Joined: 11-April 09
Member No.: 8,289



[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

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Aug 16 2010, 09:17 AM
Post #7


Programming Fanatic
********

Group: Members
Posts: 4,124
Joined: 23-August 06
From: Europe
Member No.: 9



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.


--------------------
"The earth does not belong to us. We belong to the earth."
from Vue du ciel (in French)

"Leave scepticism to others and take action"
from HOME by Goodplanet

An inconvenient truth by Al Gore
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dick Roose
post Aug 16 2010, 10:42 AM
Post #8


Newbie
*

Group: Members
Posts: 11
Joined: 11-April 09
Member No.: 8,289



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

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 16 2010, 11:29 AM
Post #9


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 14,915
Joined: 9-August 06
Member No.: 6



Threads merged. But who is Cicero? smile.gif


--------------------
"Never go to excess, but let moderation be your guide."
- Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Aug 16 2010, 12:17 PM
Post #10


Programming Fanatic
********

Group: Members
Posts: 4,124
Joined: 23-August 06
From: Europe
Member No.: 9



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.


--------------------
"The earth does not belong to us. We belong to the earth."
from Vue du ciel (in French)

"Leave scepticism to others and take action"
from HOME by Goodplanet

An inconvenient truth by Al Gore
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 16 2010, 04:21 PM
Post #11


.
********

Group: WDG Moderators
Posts: 5,617
Joined: 10-August 06
Member No.: 7



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

who is Cicero? smile.gif

A famous moderator. happy.gif


--------------------
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 16 2010, 04:45 PM
Post #12


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 14,915
Joined: 9-August 06
Member No.: 6



rolleyes.gif


--------------------
"Never go to excess, but let moderation be your guide."
- Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dick Roose
post Aug 17 2010, 11:13 AM
Post #13


Newbie
*

Group: Members
Posts: 11
Joined: 11-April 09
Member No.: 8,289



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th April 2014 - 11:20 AM