问题描述
我正在使用Codeigniter框架。我有一个来自浏览器的新标签页/窗口的链接,该链接将我的代码链接到用户的个人资料。现在,我想从打开的标签中加载由javascript呈现的表单。这是我所做的,但是没有用。
let url = baseurl+'profile/'+applicant_profile_id;
let tab = window.open(url,'_blank');
tab.document.getElementById('#container__send_pm').(baseurl+"user/get/message_personal/"+applicant_profile_id,function(){
$('.pm__msg').click(function(e){
e.stopImmediatePropagation();
$('.spnner__msg_here').html(spiner);
$('.pm__msg').attr("disabled",true);
$.ajax({
url : baseurl+'user/send_message_execute/new_msg',type : 'POST',data : $('#email_pm').serialize(),success : function(response) {
if(response == "success") {
swal('Message successfully sent',{
icon: "success",});
$('.spnner__msg_here').html('');
$('.pm__msg').attr("disabled",false).val('Send Message');
location.reload();
}else {
swal('Message was not sent.');
$('.spnner__msg_here').html('');
$('.pm__msg').attr("disabled",false).val('Send Message');
location.reload();
}
}
});
});
return false;
});
如您所见,我的newtab窗口中有一个#container_send_pm
的id标签,我想从打开的新标签中加载不同的内容。我该怎么做?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)