我使用MySQL进行数据库和codeigniter。我遇到了问题。当我点击按钮或其他东西时,我想制作一个新的窗体。所以我这样做我在视图中使用此代码:
function getproductfjs(obj) {
window.open('<?php echo base_url()."index.php/menuppic/get_all_part_po?index=";?>'addressbar=0,location=0,height=600,width=800,scrollbars=1');
}
<tr>
<input type="text" size="20" class="form-control" readonly name="idcust_0" id="idcust_0" onclick="getproductfjs(this);" placeHolder="Choose Here..."></td>
</tr>
- 然后在控制器中:
function get_all_part_po(){
$this->check_page();
$data['query'] = $this->sj->get_data_allpartpo();
$this->load->view('ppic/sj/get_all_part_po_view',$data);
}
- 然后在模特中:
function get_data_allpartpo() {
$query = $this->db->query("select p.*, c.*, n.*, s.*, c2.*
from tbl_partpo p, tbl_partcustomer c , tbl_nopo n, tbl_schedpo s, tbl_customer c2
where p.id=s.id and c.idpart = p.idpart and n.idnopo = p.idnopo and c2.idcust=c.idcust and qtyscpend <> 0 and c.idcust=1019 ");
return $query;
}