我在PHP中有一个自调用表单。这个想法是,当一个非注册用户(Joomla)点击表单中的一个按钮时,在POST时会出现一个模态并说“你还没有登录”。现在当我执行以下操作时,Modal会打开,但它不会关闭。
if(JFactory::getUser()->guest) {
echo '
<div id="ModalStart" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<h4>You are not logged in </h4><br>
</div>
</div>
';
}