The first thing that jumps out at me is $
('.ajaxadd').ajaxForm(options); Where is options defined?

On May 5, 10:02 pm, paulp75 <[EMAIL PROTECTED]> wrote:
> Ok I have a set of results from a search, and for each record in the
> result set, there is a form built.
> When they click add to cart, i would like it to have a warning, to
> check the measurements before ordering, to double check they are
> ordering the right product, then when they click ok, it will add it to
> the cart via jquery.form, when they click cancel it shouldnt add it.
>
> but this is what actually occurs. when first clicking add to cart, the
> confirmation modal pops up, click ok, and nothing happens. then if you
> add another item, both the second and first items appear in the
> shopping cart, but this occurs before clicking ok though. so the
> confirmation essentially does not work.
> if you click cancel then the product is still added.
> this is the code for clicking the add button.
>
>                 $(".ajaxadd").livequery('submit',function (e) {
>         e.preventDefault();
>
>                 // example of calling the confirm function
>                 // you must use a callback function to perform the "yes" 
> action
>                 confirm("Please check measurements", function (e) {
>
> $('.ajaxadd').ajaxForm(options);
>         return false;
>                 });
>
> and this is the code for the function to pop up the modal, and make
> the person confirm their product.
>
> function confirm(message, callback) {
>         $('#confirm').modal({
>                 close:false,
>                 overlayId:'confirmModalOverlay',
>                 containerId:'confirmModalContainer',
>                 onShow: function (dialog) {
>                         dialog.data.find('.message').append(message);
>
>                         // if the user clicks "yes"
>                         dialog.data.find('.yes').click(function () {
>                                 // call the callback
>                                 if ($.isFunction(callback)) {
>                                         callback.apply();
>                                 }
>                                 // close the dialog
>                                 $.modal.close();
>                         });
>                 }
>         });
>
> }
>
> any help on this would be great. thank you
>         });

Reply via email to