This topic is locked

Back to thye previous page

8/7/2007 10:24:54 AM
PHPRunner General questions
M
mmponline author

I need to place a hyperlink back to a previous page (Eg. on the cars template back from the photos details to the cars details page)
Is there an easy way to do this? If I use the link of the page itself, it doesn't give me the correct record I was on previously. If I can use a history type of link as in HTML it would be an easy way to return to the previous record with a back hyperlink.
Any suggestions?

M
mmponline author 8/8/2007

Still hoping for some advice...

J
Jane 8/9/2007

Stephan,
try to add following code to the ListOnLoad event for the more_photo view on the Events tab:

echo "<a href=\"car_view.php?editid1=".$_REQUEST["masterkey1"]."\">back</a>";

M
mmponline author 8/10/2007

It returns a blank page...
Click

http://1callsales.co.za/cars/car_view.php?editid1=2
then on more photos

then back to see the result...

J
Jane 8/10/2007

Stephan,
it seems that you add this code to the HTML template, not to the event.

M
mmponline author 8/10/2007

Sorry, I don't understand where to add this to an event, as it is a link back to the previous page.
I need a similar link as the "more info" and "get a quote" links on the http://1callsales.co.za/cars/cars_list.php as used in the original template. Only my link must go back from the photo details page to the previous view page. In the template, the moe photos link opened in a new window, and I don't want that and can then obviously not go back to the previous page.

F
frocco 8/10/2007

Stephan,
Your back link needs to end up looking like:
http://1callsales.co.za/cars/car_view.php?editid1=2
It looks like php is not resolving your code:

echo "<a href=\"car_view.php?editid1=".$_REQUEST["masterkey1"]."\">back</a>";


There is an events page in PHPRunner where you can add the above code.

  1. go to the events page
  2. Select the table from the list
  3. select the "List page"
  4. select "ListOnLoad"
  5. add custom event
  6. insert above code
    HTH
    Frank

M
mmponline author 8/14/2007

Frank
Thanks, you've put me on the right track, with some changes however.
In visual editor there is a new right click feature called "insert PHP Code snippet". I've added your code there and it now works perfectly.
Thanks for your help!
Stephan

M
mmponline author 7/2/2008

How can I change this code:

echo "<a href=\"car_view.php?editid1=".$_REQUEST["masterkey1"]."\">back</a>";


to display a picture (say back.jpg) in the place of the text "back". The picture wil be in the images/ folder...
Thanks for your assistance.

J
Jane 7/3/2008

Hi,
something like this should work:

echo "<a href=\"car_view.php?editid1=".$_REQUEST["masterkey1"]."\"><img src=\"images/back.jpg\" border=0></a>";