TP如何在新标签页或新窗口中打开弹出窗口 [英] How tp open popup in new tab or new window

查看:89
本文介绍了TP如何在新标签页或新窗口中打开弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,
我有一个预览按钮.当我单击该按钮时,它将显示一个基于浏览器设置的弹出窗口.但是我的要求是如何通过编码或Java脚本在newtab或新窗口中显示弹出窗口.这个问题有什么解决办法吗?如果有人知道解决方案,请提出建议.

Hi friends,
I have one preview button. When I click that button it shows a popup based on browser settings. But my requirement is how to show the popup window in newtab or new window through coding or java script. Is there any solution for this problem? Please suggest me if anyone knows the solution.

推荐答案

< a href =弹出窗口的路径" target ="_ blank">预览</a>

只需将您的预览按钮替换为上面的标签即可.

请将此答案标记为
接受的解决方案是否有帮助
您...
<a href="path of your popup" target="_blank">preview</a>

just replace ur preview button with above tag.

Please mark this answer as
accepted solution if it helped
you...


place the code below in your code behind file from where you want to get the popup in another window.
//Considering the page PopUpPage.aspx contains the data you want to popup 

string script = "";
        script += "<script language='javascript' type='text/javascript'>";
        script += " var win=window.open('~/PopUpPage.aspx', 'popup','width=802,height=500,directories=no,location=no,menubar=no,resizable=1,scrollbars=1,status=no,toolbar=no');";
        script += "</script>";
        ClientScript.RegisterClientScriptBlock(this.GetType(), "Test", script);




如果有帮助,请将此答案标记为可接受的解决方案. :-D




Please mark this answer as accepted solution if it helped you. :-D


这篇关于TP如何在新标签页或新窗口中打开弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆