A
A
aka_nez2014-11-20 18:19:40
Ruby on Rails
aka_nez, 2014-11-20 18:19:40

How to show modal window right after form submit?

Good day!
The next question threw me into a stupor.
There is a form, there is a controller that processes this form.
It sometimes processes for a long time (it can make a couple of thousand requests to a third-party server until it returns a response to the browser indicating where to redirect)
So that users are not afraid that the site is down, I want a modal window to appear immediately after submitting the form, with information that everything is fine (and the progress bar in the future)
How to show a modal window when a button is clicked is understandable.
How to submit the form is also clear.
How to connect these actions in one button is not clear.
Please tell me, is it possible to implement this at all,
and if so, in which direction to dig?
I am using ruby ​​2, rails 4, bootstrap 3.3.1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Evgrafovich, 2014-11-20
@aka_nez

$('#myModal').modal('show');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question