dou426098 2012-11-20 14:26
浏览 194
已采纳

将动态内容传递给模态框,php和jquery

I was originally using a popup window to display dynamic information when the user clicked a button:

newwindow=window.open('popup.php?ID=' + id,'name','height=500,width=500');

I switched to a modalbox set up using this

To open the modal box I'm using openDialog($('#content')); where content is a div container.

how can I open the modal box and pass the same php file I was using in the popup window? 'popup.php?ID=' + id

thanks

  • 写回答

1条回答 默认 最新

  • dqmfo84644 2012-11-20 14:30
    关注

    You could load the content first using AJAX, opening the dialog in the complete callback

    $('#content').load('popup.php?ID=' + id, function() {
        openDialog($('#content'));
    });
    

    Docs for .load()

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置