Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Linking back from related page

Explorer ,
Aug 03, 2006 Aug 03, 2006
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
TOPICS
Server side applications
539
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 04, 2006 Aug 04, 2006
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("search...
Translate
LEGEND ,
Aug 03, 2006 Aug 03, 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
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 03, 2006 Aug 03, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 03, 2006 Aug 03, 2006
I'm sure Dreamweaver may have a way of doing this, if not built-in then
certainly as an extension.
Personally, I prefer to hand code that in as I find it helps me understand
what's going on a little better.

Glad to be of assistance.
Nath.

"Tag2007" <webforumsuser@macromedia.com> wrote in message
news:eau7kh$1r8$1@forums.macromedia.com...
> 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


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 03, 2006 Aug 03, 2006
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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 04, 2006 Aug 04, 2006
Hi,
Not 100% sure about that error message, but I'm sure it means there's an
error in how you've created the link, rather than the process itself not
working. Looking at this: field_id = 14417, 14417 ...I'd personally be
trying to remove the spaces, so it was: field_id=14417

Also, I don't know why there is a comma and another field_id listed. Is
that intentional on your part?
If you've hand-coded it, I'd be having a closer look at the links.

From what I understand, shouldn't the link be something like this:
<A
HREF="sbt_results1.asp?searchID2=<%=Request.Form/QueryString("searchID2")%>

I appreciate you are creating a more complex link than that, but I'm used to
seeing a value referenced directly after the ? in a querystring, and then
being assigned a value either from another querystring, form submission,
session variable etc.

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.

Hope this helps,
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
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 04, 2006 Aug 04, 2006
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
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 04, 2006 Aug 04, 2006
Hi There,
Thanks for your feedback,

I seem to have it working now and think it was just my formatting of my strings withing the link...

Thank you very much for your time and patience..

Regards
Tag
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 04, 2006 Aug 04, 2006
LATEST
Glad I could help out.

Regards
Nath.

"Tag2007" <webforumsuser@macromedia.com> wrote in message
news:eavrak$196$1@forums.macromedia.com...
> Hi There,
> Thanks for your feedback,
>
> I seem to have it working now and think it was just my formatting of my
> strings withing the link...
>
> Thank you very much for your time and patience..
>
> Regards
> Tag
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines