boney alex Posted April 29, 2007 Share Posted April 29, 2007 Hi, I've got three buttons on a page and basically all I'm trying to do is put a BACK button as one of the three. But I'm having difficulties getting it to work. <form name="reservationinfo" action="reservationcollected.php" method="post"> <input type="hidden" name="reservationID" value="<? echo $reservationID; ?>"> <center> <table width="400" border="0" cellspacing="5"> <tr> <td><input type="submit" value= "Reservation Collected" class="button" name="submit"></td> <td><input type="submit" value='Cancel Reservation' onclick="reservationinfo.action='admincancelreservation.php'; return true;"></td> <td><input type="submit" value='Back' onclick="reservationinfo.action='history.go(-1)'; return true;"></td> </tr> </table> </center> </form> The solutions Ive been trying either take me to reservationcollected.php OR says history.go(-1) CANNOT BE DISPLAYED. Any ideas? Cheers Quote Link to comment https://forums.phpfreaks.com/topic/49171-solved-problem-with-historygo-1-back-button/ Share on other sites More sharing options...
xenophobia Posted April 29, 2007 Share Posted April 29, 2007 To take back to reservationcollected.php: onclick="window.location='reservationcollected';" To go back one page from the browser's history: onclick="history.go(-1);" Hope it helps you. Quote Link to comment https://forums.phpfreaks.com/topic/49171-solved-problem-with-historygo-1-back-button/#findComment-241050 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.