If you year card allways follows that format then you could
use the
following code on the page.
Outside of the repeat region have this statement
<%
Dim TestYear, CurrentYear, ThisYearCard
TestYear = "0000"
%>
Then in the repeat region where you want the anchor to appear
use this code
<%
ThisYearCard = recordset.fields.item("YearCard").value
CurrentYear = Left(ThisYearCard, 4)
If TestYear <> CurrentYear then
response.write("A name='") & CurrentYear & "'>"
TestYear = CurrentYear
End if
%>
Where you want the Year card to appear you would then use
<%=ThisYearCard%>
rather than the recordset element.
--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"obcbeatle" <webforumsuser@macromedia.com> wrote in
message
news:e67pg5$rp0$1@forums.macromedia.com...
>I have a page (results.asp) that gets dynamically
generated from a db using
>a
> DW and MySQL app. The page (a table) looks sometihng
like this:
>
> Year Card #
> 1951 01
> 1951 02
> 1951 03
> 1952 01
> 1952 02
> 1953 01
> 1953 02
> 1953 03
> and so on
>
> I've made the "Year" column a text link and added a
Pop-Up Menu behavior
> so
> that users could select a year and jump directly to a
specific section of
> the
> page (table). However, I'm not sure how to put a <a
href> name anchor in
> for
> each of the years. For instance calling :
>
> <a name="1951">1951</a>
>
> from a declaration of:
>
> <a href="#1951">Go to year 1951</a>
>
> I would want to call each year (1951, 1952...1973) using
name anchors.
> But
> again, I'm not sure how to put all the named anchors in
a document that
> gets
> dynamically generated. It is a a table that gets its
data generated via a
> Repeated Region. Hope this question makes sense. Any
> suggestions/comments
> appreciated. Thanks.
>