Skip to main content
Inspiring
August 3, 2006
Answered

Linking back from related page

  • August 3, 2006
  • 8 replies
  • 546 views
Hi Guys,

I have a search page that displays a list of results, when I click this list I get a detail page with more info,

But once on the detail page How do i get the user back to the last page with the same record /s on it without them having to click back on the browser?

I just want a small text link to click that says back to record of XXX and when clicked it goes back to the start of the trail...

I tried making links and adding the detail page behavour and passing an url parimiter back to the page but it errors out?

Im using DW8 / ASP /VBS / Access 2000

Thanks again
Tag
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Newsgroup_User
Sorry, in relation to this....

"Also, keep in mind that if your results page (2) is initially being fed by
the results of a FORM and you then, on the link back from page 3, are trying
to feed it with a QUERYSTRING, you will get an error with the recordset. If
that's happening, I think you just need to change the METHOD of the original
form to GET rather than POST."

I should have also mentioned that you'd need to change your recordset on the
results list page (page 2) from Request.Form("searchfield") to
Request.QueryString("searchfield")

Doops!
Nath.

"Tag2007" <webforumsuser@macromedia.com> wrote in message
news:eauant$50e$1@forums.macromedia.com...
> Hi I Tried it and get an error..
>
> I search on page 1
>
> Results list on page 2
>
> Details on page 3
>
> All work, But my new link on page 3 back to page 2 works But when back on
> page
> 2 if you click a result again to view the details it errors out saying
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error (comma) in query
> expression 'field_id = 14417, 14417'.
>
>
> Here are my 2 links I tried as suggested.
>
> Link On Results page :page2
> To Detail Page
>
> <A HREF="/sbt_results2.asp?<%= Server.HTMLEncode(MM_keepURL) &
> MM_joinChar(MM_keepURL) & "searchID=" &
> RS_sbt_results.Fields.Item("field_id").Value %>" & "searchID2=" &
> Request.Form("txt_sbt")" class="style4">View</A>
>
> ------------------------------------------------------------------
>
> Back To results
>
>
> <A HREF="/sbt_results1.asp?<%= Server.HTMLEncode(MM_keepURL) &
> MM_joinChar(MM_keepURL) & "searchID2=" & Request.Form("txt_sbt")%>">View
> Search
> Results</A>
>
> Thanks again for any help
> Tag
>


8 replies

Inspiring
August 3, 2006
Hi Tag,

When the user clicks the link to the detail page, I'd assume you are
probably passing an ID value so that the detail page knows which record to
display?

What you need to do is to also pass the original search value to the detail
page, as well as the ID value. Then, when you are on the detail page, you
would put this search value into the link back to the search results page so
that when it goes back it displays the same details.

Something like this for the link TO the details page
<a
href="detailspage.asp?recordID=<%=(rsRecordset.Fields.Item("recordID").Value)%>&search=<%=Request.Form("search")%>">View
Details</a>

...and something like this for the link BACK to the search page:
<a
href="searchresultspage.asp?search=<%=Request.QueryString("search")%>">Back
to Search Results</a>

Hope this points you in the right direction. If I can help out further,
just let me know.
Regards
Nath.

"Tag2007" <webforumsuser@macromedia.com> wrote in message
news:eask8p$rm$1@forums.macromedia.com...
> Hi Guys,
>
> I have a search page that displays a list of results, when I click this
> list I
> get a detail page with more info,
>
> But once on the detail page How do i get the user back to the last page
> with
> the same record /s on it without them having to click back on the browser?
>
> I just want a small text link to click that says back to record of XXX and
> when clicked it goes back to the start of the trail...
>
> I tried making links and adding the detail page behavour and passing an
> url
> parimiter back to the page but it errors out?
>
> Im using DW8 / ASP /VBS / Access 2000
>
> Thanks again
> Tag
>


Tag2007Author
Inspiring
August 4, 2006
Thank you Tradmusic,
Thats exactly what I want to do...

I will give this a try.
Does Dreamweaver have a way of doing this or do I just write the code in myself?

Many thanks
Tag