Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

How to script with href=# (links on same page)

I've got a page full of events, which is actually populated by looping through the events folder and including the event folder article's body and headlines.

A summary page of events (just the headline and teaser) currently points to the events page. But if you've got an event that doesn't show until half way down the page - how do I get the link on the summary to jump to that point, rather than the top of the events page?

Has anyone else used similar for <a href=#etc> and <a name=etc> ?


Wednesday, September 10, 2003

Duh - it was really easy in the end -

In my loop through the articles - just put <a name={$x.filename$} where I want to jump to on the events page (and don't forget a closing </a> )

On the summary page where I've got a loop for the events, I need to include <a href="events.html#{$x.filename$}"> and again don't forget the </a>

I will return to talking to myself.  (-:

Wednesday, September 10, 2003

But what about adding an anchor in the same page..?
Not quite as popular a feature, but nontheless. Sure, you can add <a name> in HTML view, but why not add such a feature also in normal view?

Thursday, September 11, 2003

*  Recent Topics

*  Fog Creek Home