G
G
gerion2012-04-12 14:45:25
JavaScript
gerion, 2012-04-12 14:45:25

Modal Bootstrap, modal update?

Is it possible to update a Bootstrap modal using onchange="document.form.submit();"?

After selecting the first item, the modal window closes :(
The second select will be formed dynamically, depending on the choice of the first one.
Example: jsfiddle.net/UG2yJ/1/

Thanks.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vitalets, 2012-04-12
@vitalets

To do this, you need to submit the form via Ajax and load the result in the modal-body.
If you are using jQuery, then:

$('#formRedirect').on('submit', function(
    $(".modal-body").load('http://submit-url', $(this).serialize());
   return false;
));

But ideologically, it’s better not to do submit on onchange, but simply load the data in the second select

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question