Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Contents link

Status
Not open for further replies.

csniffer

Programmer
Apr 30, 2003
161
GB
hello,
i have been following a tutorial from a site to make a contents page but it does not go to the right point in the page can anyone tell me why.
thanks
Code:
<ul>
<li> <a href=&quot;sesfaq.html#student&quot;>student what will ses do for me</a>
<li> <a href=&quot;sesfaq.html#Can ses help me find a job after leaving&quot;>Can SES help me find a job after leaving?</a>
</ul>

<a name=&quot;student&quot;><h3>As a student what will ses do for me.</h3></a>

<a name=&quot;Can ses help me find a job after leaving&quot;><h3>Can SES help me find a job after leaving.</h3>

To err is human, to completely mess up takes a computer. [morning]
 
If the page isn't long enough, you will not notice the scrolling effect.

Also, you might want to shorten the anchor names and remove the spaces....

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
i cut all the crap and just put necessary bits in.
On the tutorial I was using it just jumped straight to the target but mine does not for some reason. it just stays at the top?

To err is human, to completely mess up takes a computer. [morning]
 
I have used this functionality on a page I created, and the only difference I see between yours and my code is that I don't have the html page reference. It would look like this:
Code:
<ul>
<li> <a href=&quot;#student&quot;>student what will ses do for me</a>
<li> <a href=&quot;#Can ses help me find a job after leaving&quot;>Can SES help me find a job after leaving?</a>
</ul>

<a name=&quot;student&quot;><h3>As a student what will ses do for me.</h3></a>

<a name=&quot;Can ses help me find a job after leaving&quot;><h3>Can SES help me find a job after leaving.</h3>
 
Fairly sure some browsers will choke on the spaces in the second name, and it's a lot to type isn't it? Other than that, dunno why it isn't working - but you could try this...
[tt]
<ul>
<li> <a href=&quot;#student&quot;>student what will ses do for me</a>
<li> <a href=&quot;#job&quot;>Can SES help me find a job after leaving?</a>
</ul>

<a name=&quot;student&quot; id=&quot;student&quot;></a><h3>As a student what will ses do for me.</h3>

<a name=&quot;job&quot; id=&quot;job&quot;></a><h3>Can SES help me find a job after leaving.</h3>
[/tt]


-- Chris Hunt
 
now it is bugging me. This should have taken an hour but it has taken two days. Here is the link to the page. If you cant see the problem does anybody have a different way of doing this. i just seem to be missing something, Thanks.


To err is human, to completely mess up takes a computer. [morning]
 
Works nicely for me. Note that the page has very little text and thus no scrollbar therefore the focus cannot be moved to another point on the page. Add a bunch of <br />s at the end and you will see that it is working. Or make the window really really small, again you will see that it jumps to that section. If the page doesn't scroll, no jumping can be performed. You're just already there. :)
 
Ok thanks, i get the picture. The browser cannot move.
Thanks for taking a look as it had me stumped [bugeyed]


To err is human, to completely mess up takes a computer. [morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top