0

At this page there is a second orange button under the price called "Заказ в 1 клик". If you click it, input all needed data in the appeared form and then press the blue button "Купить" - you will see that no data is submitted.

Data cann't be submited due to this function:

$("#contactForm_oneclick").click( function(){
        return false;
    })

which is created to block this function

jQuery("#aux").click( function() {//функция, скрывающая форму
            jQuery("#contactForm_oneclick").fadeOut();
            jQuery("#window").fadeOut();
            jQuery("#aux").css("display","none");
            jQuery("html,body").css("overflow","auto");
        } );

which is created to hide the form if you click somewhere else then at the form. How to change this situation and to make the button "Купить" work correctly?

Boris Garkoun
  • 127
  • 2
  • 12
  • If you replace your `jQuery("#aux")` event with a click outside event then you won't need the blocking function. https://stackoverflow.com/questions/2554779/jquery-ui-close-dialog-when-clicked-outside – Shmoopy Jun 02 '17 at 15:15
  • Possible duplicate of [jQuery UI - Close Dialog When Clicked Outside](https://stackoverflow.com/questions/2554779/jquery-ui-close-dialog-when-clicked-outside) – Shmoopy Jun 02 '17 at 15:15

1 Answers1

0

Thank you! if I change the handler for the "click" event on $("#contactForm_oneclick") as such:

$("#contactForm_oneclick").click( function(e){
    if(e.target.getAttribute('class') != 'addtocart_button') {
        return false;
    }
})

everything works fine

Boris Garkoun
  • 127
  • 2
  • 12