Jump to content

[SOLVED] Problem with "history.go(-1)" BACK button


Recommended Posts

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.