Pop-up when deleting **cart item

Hi there,

We have a precart page that essentially acts like a cart before the patron get to the actual TNEW cart page. On this precart-cart, you may add/remove items from the cart. Each add/remove action runs through validate_cart, as does the actual TNEW cart. I mention this because I understand we can't edit the TNEW cart and want to point out my question doesn't deal with the standard TNEW cart.

If you've made it this far, here is my question: How can we throw an "are you sure you want to delete..." type message, perhaps in the form of a small pop-up window, that would have yes or no buttons, when they click the delete button, prior to actually deleting the item?

I've heard of using ajax/jquery to accomplish this but am not familiar with those languages. This is more of a web developer question rather than Tessitura/TNEW. 

 

Hope that made sense. Thanks in advance! 

Parents
  • You could do something like this (this is a basic version, but should work):

    <a href="yourremoveticketsprocess.aspx?lineitem=n" onclick="return window.confirm('Are you sure?');">Remove</a>

    window.confirm is a javascript function that opens a standard confirmation box with "Ok" and "Cancel" buttons, and returns true or false based on which one was clicked.

    This would trigger the default confirmation box and if ok is clicked, would continue with the hyperlink, or if cancel is clicked, just closes the confirmation window and do nothing.

    Kevin.



    [edited by: Kevin Holmes at 3:06 PM (GMT -6) on 12 Aug 2015]
Reply
  • You could do something like this (this is a basic version, but should work):

    <a href="yourremoveticketsprocess.aspx?lineitem=n" onclick="return window.confirm('Are you sure?');">Remove</a>

    window.confirm is a javascript function that opens a standard confirmation box with "Ok" and "Cancel" buttons, and returns true or false based on which one was clicked.

    This would trigger the default confirmation box and if ok is clicked, would continue with the hyperlink, or if cancel is clicked, just closes the confirmation window and do nothing.

    Kevin.



    [edited by: Kevin Holmes at 3:06 PM (GMT -6) on 12 Aug 2015]
Children
No Data