doubomudichen0832 2012-10-03 08:00
浏览 81
已采纳

jquery对话框,在同一个对话框窗口中打开一个链接

I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is.

Here's how my link looks like, it is formed in a php file and then passed to the html template:

$link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to open this link in the same dialog window</a>";

And here's my jquery code:

  $("#dosomething").dialog(
            { autoOpen:false,
              modal:true,
              overlay: { opacity: 0.8, background: "black" },
              width:850,
              height:650,
              title:"A title",
              draggable:true,
              hide:"slow",
              closeOnEscape: true
            }); 
            $("#dosomething").dialog("open");
  • 写回答

3条回答 默认 最新

  • donglinxi1467 2012-10-03 08:04
    关注
    $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' onclick="loadurl();" >Need to open this link in the same dialog window</a>";
    
    $(document).ready(function(){
    
       function loadurl(){
       $("html").load("mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."")
       }
    
    
    })
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

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