Answer the question
In order to leave comments, you need to log in
Can modals conflict with each other?
Three widgets are connected on one page: a modal window with a callback (action site/callback), a form with a questionnaire (action site/anketa) and a modal window with reviews (action review/add). connected in the same order.
In each, approximately the same code (variable names differ)
<?php echo BsHtml::ajaxSubmitButton(Yii::t('app','Отправить'), $this->createUrl('site/anketa'), array(
'dataType'=>'json',
'type'=>'POST',
'success'=>'function(data)
{
if(data.status=="success")
{
$("#modalAnketa").modal("show");
$("#anketa-form")[0].reset();
$(".captcha img").attr({"src": "/review/captcha/refresh/?"+Math.floor(Math.random()*(98)) + 1});
$(".images .thumbnails li").remove();
}
else
{
$.each(data, function(key, val)
{
$("#anketa-form").find("#"+key+"_em_").text(val).show();
});
$(".captcha img:first").trigger("click");
}
}',
),
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question