Forums

This topic is locked

Linking to 1 of 3 detail pages

Posted 26 Feb 2001 16:03:08
1
has voted
26 Feb 2001 16:03:08 carl jordan posted:
Hi,

I'm trying to add a "Go to Detail Page" behaviour to a "latest news page" with the detail page being one of three possibilities depending on which record was clicked.

eg: records have a category assigned in the db: england, france or germany.
Latest news page displays 10 most recent news items from all 3 categories.
Detail page needs to be "england_detail.asp" if an england category record is clicked.
or "france_detail.asp" if a french category record is clicked etc.

Some sort of 'if' condition needs to be slotted in somewhere but I'm not really a coder.

Any help is appreciated.

Carl

Replies

Replied 26 Feb 2001 16:52:41
26 Feb 2001 16:52:41 Bjorn Fripon replied:
I had a familiar problem a while back
I placed a form on the (second?) detailpage
that had an unique invisible form-element (user name) and it worked for me ...

greetz

Jezter/Bjorn

Replied 02 Mar 2001 10:25:39
02 Mar 2001 10:25:39 carl jordan replied:
Thanks for the reply, I had managed to get it working in the meantime a slightly different way though. For the record the code I used is below:-

<%
Dim strCategory
Dim strRedirect
strCategory = (rsBSBheadlines.Fields.Item("category".Value)
If strCategory = "news" Then strRedirect = "news/bsb_news.asp"
If strCategory = "review" Then strRedirect = "results/results_detail.asp"
If strCategory = "preview" Then strRedirect = "preview/preview_detail.asp"
%>
<A HREF="<%Response.Write strRedirect%>?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "id=" & rsBSBheadlines.Fields.Item("id".Value %>">

Reply to this topic