dto52236 2014-06-23 12:36
浏览 38

在php中将数据发送到FancyBox

I need to pass a value to a modal window (fancybox). To do this I created the following code:

$.fancybox.open({
    type: 'iframe', // ajax but switched to iframe for testing
    href: '<?php echo base_url(); ?>index.php/aggiungiFarmaci_controller',
    maxWidth: 800,
    maxHeight: 600,
    fitToView: false,
    autoSize: true,
    closeClick: false,
    autoCenter: true,
    scrolling: 'no',
    padding: 0,
    ajax: {
        type: "POST",
        cache: false,
        data: $("#formCF").serialize(),
    },
    helpers: {
        overlay: {
            closeClick: false,
            css: {
                'background': 'rgba(150,144,146,.60)'
            }
        }
    }
});

The page I want to open and populate with the value passed by the caller of the modal window has the following code:

public function index() {
    $this->load->helper((array('form')));
    $this->load->library('form_validation');
    $data = array('aic' => $this->input->post('codiceFarmaco'));
    $this->load->view('aggiungiFarmaci_view',$data);
}

Unfortunately I can not pass the parameter I wanted (AIC Code) to the modal window that opens without showing it. How can I fix? I think the problem lies in the code that calls fancybox, but I do not know what else to try. Thank you so much for the help

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 测距传感器数据手册i2c
    • ¥15 RPA正常跑,cmd输入cookies跑不出来
    • ¥15 求帮我调试一下freefem代码
    • ¥15 matlab代码解决,怎么运行
    • ¥15 R语言Rstudio突然无法启动
    • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
    • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
    • ¥15 用windows做服务的同志有吗
    • ¥60 求一个简单的网页(标签-安全|关键词-上传)
    • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法