Pop-up is blocked, how to fix?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
12 views
Hello.

Put on the button event form submission via setTimeout and made a delay, but the browser has blocked a pop-up window.

How to send the form with a setTimeout?

$('form').on('submit', function(event) { event.preventDefault(); var form = this; setTimeout(function() { form.submit(); }, 2000); });
by | 12 views

1 Answer

0 like 0 dislike
Now tested, if setTimeout to put more than 1 second - blocks. The test was conducted in chrome, Opera and Mozila.

I need to redirect after 2-3 seconds, so the user was able to see a warning about the redirect.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users