Forums
This topic is locked
Back Button
Posted 18 Jun 2003 15:26:50
1
has voted
18 Jun 2003 15:26:50 kirsty burgoine posted:
I want to create a back button for my detail page that goes back to the record that was clicked instead of going back to the beginning of the recordset.For example:
I have a list of all the music shops in the west Midlands that we deal with displayed in a table with the repeat region function. To get the contact details for each shop I've made the shops name a link and used the Go to Detail Page function.
If somebody looked through three pages of shops and found one beginning with S then looked at their details I want to create a back button that goes back to that record not back to the beginning of the list.
I assume its to do with passing the parameter (in this case ID) back again but I'm not sure how to go about it.
Hope someone can help.
Kirsty
Replies
Replied 18 Jun 2003 16:35:25
18 Jun 2003 16:35:25 Owen Eastwick replied:
If no form actions take place on the detail page and it isn't refreshed etc. you can use a simple JavaScript command to mimick the action of the user clicking the browser back button, for example:
With a link:
<a href="#" onClick="history.back()">Back</a>
With a button:
<input type="button" name="Back" value="Back" onClick="history.back()">
If the history.back() method doesn't work and you are using DW's standard recordset navigation behavior, you can pass the offset value to the detail page along withe the ID paramater, something like:
<a href="detailPage.asp?RecordID=<%= rsName.Fields.Item("RecordID"
.value & "&offset=" & Request.QueryString("offset"
%>">Details</a>
Then on the detail page you can link back to the recordset display page:
<a href="Records.asp?offset=<%= Request.QueryString("offset"
%>">Back</a>
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
With a link:
<a href="#" onClick="history.back()">Back</a>
With a button:
<input type="button" name="Back" value="Back" onClick="history.back()">
If the history.back() method doesn't work and you are using DW's standard recordset navigation behavior, you can pass the offset value to the detail page along withe the ID paramater, something like:
<a href="detailPage.asp?RecordID=<%= rsName.Fields.Item("RecordID"


Then on the detail page you can link back to the recordset display page:
<a href="Records.asp?offset=<%= Request.QueryString("offset"

Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/