Question

Hello I was wondering if there was some javascript to auto launch the modal window within bootstrap 2.3.2. I am using the modal window for a form and the code for the from is on page and I want the modal window to open back up on the event of an error in the form. My code works fine and it shows the error message in the modal window bu you have to relaunch the window to see it so users may not necessarily know they have errors, so that's my dilemma.

Is there a way to do this? The page isn't refreshing so I can't say load it when the page loads, as I have seen that before.

Was it helpful?

Solution

To launch your modal you can use the following call in javascript/jQuery

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

http://getbootstrap.com/2.3.2/javascript.html#modals

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top