弹出窗口未打开 [英] Pop Up Window is not opening

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

问题描述

Dear All,

We need to open a pop up window in an anchor tag in code behind.

The code is attached below.Its not working.We need to open the window as a pop up same like GMAIL Chat Window.



sb.Append(userIcon +
+ loggedInUser.User.Username +
++ userOnlineStatusIcon +

);



请帮忙。 />


问候

Sreejith


sb.Append(userIcon + "
" + loggedInUser.User.Username + "
" + " " + userOnlineStatusIcon + "
");

Please help.

Regards
Sreejith

推荐答案

首先,您的代码示例没有显示任何打开弹出窗口的尝试,所以很难说你是否有一些bug。



无论如何,弹出窗口非常糟糕在大多数情况下应该避免。它们会刺激许多用户,是侵入性的(用户更清楚在哪个窗口或标签中打开哪个页面,或者只是替换当前窗口内容),并且经常使用浏览器的选项/插件在浏览器中被阻止。 />


这个可疑技术的一个很好的替代品是在同一页面上模拟模态行为,就像jQuery对话框一样: https://jqueryui.com/dialog [ ^ ]。



您还可以找到许多第三方插件,统称为模态弹出窗口,具有不同的效果,例如过渡,特别是调光窗口的其余部分。



-SA
First of all, your code sample does not show any attempt to open a pop-up window, so it's hard to say if you have some bug.

Anyway, pop-up windows are pretty bad and should be avoided in most cases. They irritate many users, are intrusive (the user knows better what page to open in what window or tab, or just replace a current window content) and are often blocked in the browsers, using the browsers' options/plug-ins.

One good substitute for this questionable technique is simulation of modal behavior on the same page, as with jQuery dialog: https://jqueryui.com/dialog[^].

You can also find many 3rd-party plug-ins, collectively known as "modal popup", featuring different effects, such as transitions, and, notably, dimming of the rest of the window.

—SA


这篇关于弹出窗口未打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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