下面是我将按钮打开到新页面的代码,但点击功能更加复杂。这里也发生了后期处理,这使得 window.open 在弹出块中。
我试图删除发布功能并尝试过,新页面运行良好。任何人都可以在这个问题上提供帮助。
$('#catalog_demo_button a').click(function(e) {
var curEmailId = $('#field-email').val();
var validemail = validateEmail(curEmailId);
if (validemail)
{
RSUI.util.setCookie("curEmailIdsc", curEmailId);
$.post($("#targetform").val(),
{
email : $('#field-email').val(),
demo_lang : $('#selectedLang').val(),
cis_name : $("#cis_name").val(),
website : $("#website").val(),
form_type : "demo",
demo_type : $("#form_type").val(),
form_url : $("#form_url").val(),
cid : $.trim(RSUI.util.getCookie('affiliate'))
},function(data)
{
if (data != "")
{
data = eval("("+data+")");
if (data[0].cisFlag == "true")
{
s.events="event19";
s.t();
delete s.events;
s.sendFormEvent('s', s.pageName, "Demo Email Form");
adconionConversionCall();
var demolangid = $("[name=language_code]").val();
URL= 'url'+demolangid;
if(demolangid == 'ENG' || demolangid == 'ESC' || demolangid == 'ESP' || demolangid == 'DEU' || demolangid == 'FRA' || demolangid == 'ITA' || demolangid == 'SVE')
$('#demo').overlay().load();
else
window.open(URL,'_blank')
$("#demoform a.close").click();
}
else {
s.sendFormEvent('e', s.pageName, "Demo Email Form", "Email Submission Failed");
}
}
}, "");
}
else
{
$("#field-email").val(errorEmailText);
$('#field-email').css('border', '1px solid red');
s.sendFormEvent('e', s.pageName, "Demo Email Form", "field-email");
}
});