Bootstrap Modal显示为错误消息

时间:2015-02-19 09:23:36

标签: javascript php twitter-bootstrap

所以,我有这个包含表单的模态,一旦它点击提交按钮,另一个模态应该显示为成功消息或错误消息。

<div class="modal fade" id="events" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header" style="background-color:#0A0A1E">
                    <a href="#" class="close" data-dismiss="modal"><font color="white">x</font></a>
                    <h4><font color="white">ADD EVENT</font></h4>
                </div>
                <div class="modal-body">






                        <form id ="massform" method="POST" role="form" action="SAeventUpdate.php">

                        <div class="form-group">

                          <label>MASS TYPE</label>
                            <div class="input-group">
                              <input class='form-control' list = 'title' required name='title' placeholder= 'Please specify if mass type is unavailable'>
                              <datalist id='title'>
                                <option class= 'titl' value="Baptism">Baptism</option>
                                <option class= 'titl' value="Confirmation">Confirmation</option>
                                <option class= 'titl' value="Requiem">Requiem</option>
                                <option class= 'titl' value="Marriage">Marriage</option>
                              </datalist>
                              <span class="input-group-addon"><span class="fa fa-bullhorn"></span></span>
                            </div>
                        </div>  

                        <div class="form-group">
                        <label>LANGUAGE</label>
                            <div class="input-group">
                              <select class='form-control' required name='language' placeholder= 'Please select language'>

                                <option  value="Cebuano">Cebuano</option>
                                <option  value="English">English</option>
                              </select>
                              <span class="input-group-addon"><span class="fa fa-comment-o"></span></span>
                            </div>
                        </div> 
<button class="btn btn-danger" type="submit">Add Event</button>
                        </form>
                 </div>

            </div>
        </div>
    </div>

然后表单将信息发送到php文件并经历一个条件,并且如果操作不可行,则应通过模式显示错误消息而不关闭先前的模式。 这甚至可能吗? :)

0 个答案:

没有答案