У меня есть DIV
, который открывается после подачи формы на button click
. код DIV нижеОткрыть новую страницу во всплывающем окне вместо DIV
<div id="successmsg" style="font-family: 'signika_negativeregular', sans-serif; font-size: 0.9em;">
<div style="height: auto; margin-bottom: 10px; color: #193284; padding: 5px 5px 5px 5px; font-size: 15px; background: url(images/common/header-bottom-line.png) no-repeat bottom left; font-weight: bold; line-height: 1.5em;">
<div id="divTitle1" runat="server"></div>
<div style="width: 434px; margin-bottom: 10px; line-height: 1.7em; text-align: justify; font-size: 14px; font-family: 'signika_negativeRegular', sans-serif; color: #666; margin-top: 10px;">
<div class="readmoreNew2">
We appreciate and acknowledge your interest shown towards RBL Bank.<br />
Our team would get back to you soon.
</div>
</div>
<input type="button" id="btnOk" value="OK" class="btnDropbox" style="background: #CF060D; font-family: 'signika_negativesemibold', sans-serif; color: #ffffff; font-size: 15px; font-weight: 500; text-transform: uppercase; border: none; padding: 5px 11px 5px 9px; cursor: pointer;" />
</div>
</div>
Это выглядит как this.
код, чтобы открыть это в всплывающем окне приводится ниже в JS и отделенный код кнопки мыши,
JAVASCRIPT КОД
$(document).ready(function() {
$("#successmsg").dialog({
autoOpen: false,
height: 230,
width: 580,
modal: true,
open: function() {
$('#btnClose').click(function() {
$("#successmsg").dialog('close');
});
},
beforeClose: function (event, ui) {
location.href = "Career.aspx";
}
});
$("#btnOk").on("click", function() {
$("#successmsg").dialog('close');
});
$('.ui-dialog .ui-dialog-titlebar').css({ 'background': 'none', 'display': 'none' })
});
Также смотрите отделенный код кнопки мыши
КОДЕКС
protected void btnSubmit_Click(object sender, EventArgs e)
{
ClientScript.RegisterStartupScript(this.GetType(), "uploaded", "$(document).ready(function(){$('#successmsg').dialog('open');});", true);
}
Теперь, вместо div. У меня есть страница с именем Thanks.aspx
, которую я хочу вызвать во всплывающем окне.
Пожалуйста, помогите, как это сделать.
использование JQuery $ ('# Диалог') нагрузки ('yourpath', функция() { $ (это) .dialog ({ модальный:. Правда, высота: 200 }); }); –
загрузить страницу с помощью ajax – charlietfl
@ArunprasanthKV: Не могли бы вы дать ответ в ответ, поскольку я не получаю его. – Geeker