Jump to content

How do I make my "Cancel" button drop information on a page?


DavidD95

Recommended Posts

Apologies for this because it's probably very simple, but I've never worked with JavaScript or PHP or anything before.

 

So the website I am producing is to sell tickets for something. To purchase these tickets the user is required to click on the seats they want and it will pop up in a box on the left hand side confirming their seat selection and how much the ticket is.

 

The website has to feature a "Reset Database" button which totally resets everything. No tickets are selected anymore, the user is logged out etc. I have this working fine.

 

It also has to feature a "Cancel" button, which simply removes the seats the user has selected, but still keeps them logged in. How do I code this?

 

This is what the "Cancel" button looks like on the Index page:

 

  <div id="theButtons">
     <input type="button" value="Cancel Choices" title="Cancel Choices" onclick="cancel()" />
  </div>

 

And this is my code on the JavaScript page:

 

 function cancel(){
var s = document.getElementsByTagName('space');
   window.location="index.php";
  }

 

How do I get this working?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.