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! 

  • 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]
  • Hi Kevin,

     

    That sounds like exactly what I need! I’ll muck around with it and let you know how it goes.

     

    Thanks so much!

     

    From: Tessitura Web Forum [mailto:forums-tessitura-web@tessituranetwork.com] On Behalf Of Kevin Holmes
    Sent: Wednesday, August 12, 2015 12:12 PM
    To: Steven Jirjis
    Subject: Re: [Tessitura Web Forum] Pop-up when deleting **cart item

     

    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>

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

    Kevin.

    From: Steven Jirjis <bounce-stevenjirjis4325@tessituranetwork.com>
    Sent: 8/12/2015 1:53:25 PM

    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! 




    You were sent this email automatically because you subscribed to the Tessitura Web forum. You may reply to this message to post to the Web forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!