右小角提醒框

觉v醒 2010-06-30 03:56:42
比如提醒新邮件等 我现在用的是extjs 的ext.window 来实现的 但如果网页最小化就看不到提示了
我想问问大家 你们是怎么解决这种情况的?(ACTIVEX 可以接受,以前没写过 望大家给个例子)

最终目标就是 只要我那个系统页面不关 提示就可以在右小角出现 无论树网页最小化,浏览器多标签浏览其他页面等
...全文
110 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
觉v醒 2010-07-01
  • 打赏
  • 举报
回复
[Quote=引用 14 楼 myhid 的回复:]
window.open个小窗口,js控制慢慢移上来不就可以了吗?
[/Quote]

ie6下可以 像遨游 或ie7 浏览器可以多标签浏览 window.open 新开了的页面时标签
myhid 2010-07-01
  • 打赏
  • 举报
回复
window.open个小窗口,js控制慢慢移上来不就可以了吗?
伴老思源 2010-07-01
  • 打赏
  • 举报
回复
winpopup~
anbs01 2010-07-01
  • 打赏
  • 举报
回复
精!!!!!!!!!!
liujintaozyc 2010-07-01
  • 打赏
  • 举报
回复
上网找啊 网上有
blank223 2010-07-01
  • 打赏
  • 举报
回复
js文件:
function CLASS_MSN_MESSAGE(id,width,height,caption,title,message,target,action){
this.id = id;
this.title = title;
this.caption= caption;
this.message= message;
//this.target = target;
this.action = action;
this.width = width?width:200;
this.height = height?height:120;
this.timeout= 150;
this.speed = 20;
this.step = 1;
this.right = screen.width -1;
this.bottom = screen.height;
this.left = this.right - this.width;
this.top = this.bottom - this.height;
this.timer = 0;
this.pause = false;
this.close = false;
this.autoHide = true;
}

/**//*
* 隐藏消息方法
*/
CLASS_MSN_MESSAGE.prototype.hide = function(){
if(this.onunload()){

var offset = this.height>this.bottom-this.top?this.height:this.bottom-this.top;
var me = this;

if(this.timer>0){
window.clearInterval(me.timer);
}

var fun = function(){
if(me.pause==false||me.close){
var x = me.left;
var y = 0;
var width = me.width;
var height = 0;
if(me.offset>0){
height = me.offset;
}

y = me.bottom - height;

if(y>=me.bottom){
window.clearInterval(me.timer);
me.Pop.hide();
} else {
me.offset = me.offset - me.step;
}
me.Pop.show(x,y,width,height);
}
}

this.timer = window.setInterval(fun,this.speed)
}
}

/**//*
* 消息卸载事件,可以重写
*/
CLASS_MSN_MESSAGE.prototype.onunload = function() {
return true;
}
/**//*
* 消息命令事件,要实现自己的连接,请重写它
*
*/
CLASS_MSN_MESSAGE.prototype.oncommand = function(){
//this.close = true;
this.hide();

window.open(this.action);

}
/**//*
* 消息显示方法
*/
CLASS_MSN_MESSAGE.prototype.show = function(){

var oPopup = window.createPopup(); //IE5.5+

this.Pop = oPopup;

var w = this.width;
var h = this.height;

var str = "<DIV style='BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 0px; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: " + w + "px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: " + h + "px; BACKGROUND-COLOR: #c9d3f3'>"
str += "<TABLE style='BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid' cellSpacing=0 cellPadding=0 width='100%' bgColor=#cfdef4 border=0>"
str += "<TR>"
str += "<TD style='FONT-SIZE: 12px;COLOR: #0f2c8c' width=30 height=24></TD>"
str += "<TD style='PADDING-LEFT: 4px; FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #1f336b; PADDING-TOP: 4px' vAlign=center width='100%'>" + this.caption + "</TD>"
str += "<TD style='PADDING-RIGHT: 2px; PADDING-TOP: 2px' vAlign=center align=right width=19>"
str += "<SPAN title=关闭 style='FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: red; MARGIN-RIGHT: 4px' id='btSysClose' >x</SPAN></TD>"
str += "</TR>"
str += "<TR>"
str += "<TD style='PADDING-RIGHT: 1px;PADDING-BOTTOM: 1px' colSpan=3 height=" + (h-28) + ">"
str += "<DIV style='BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 8px; FONT-SIZE: 12px; PADDING-BOTTOM: 8px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 8px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%'>" + this.title + "<BR><BR>"
str += "<DIV style='WORD-BREAK: break-all' align=left><A href='alert('有人上线')' hidefocus=false id='btCommand'><FONT color=#ff0000>" + this.message + "</FONT></A><A href='http://www.ytzhaoyang.net' target='content3' hidefocus=false id='ommand'><FONT color=#ff0000></FONT></A></DIV>"
str += "</DIV>"
str += "</TD>"
str += "</TR>"
str += "</TABLE>"
str += "</DIV>"

oPopup.document.body.innerHTML = str;


this.offset = 0;
var me = this;

oPopup.document.body.onmouseover = function(){me.pause=true;}
oPopup.document.body.onmouseout = function(){me.pause=false;}

var fun = function(){
var x = me.left;
var y = 0;
var width = me.width;
var height = me.height;

if(me.offset>me.height){
height = me.height;
} else {
height = me.offset;
}

y = me.bottom - me.offset;
if(y<=me.top){
me.timeout--;
if(me.timeout==0){
window.clearInterval(me.timer);
if(me.autoHide){
me.hide();
}
}
} else {
me.offset = me.offset + me.step;
}
me.Pop.show(x,y,width,height);

}

this.timer = window.setInterval(fun,this.speed)



var btClose = oPopup.document.getElementById("btSysClose");

btClose.onclick = function(){
me.close = true;
me.hide();
}

var btCommand = oPopup.document.getElementById("btCommand");
btCommand.onclick = function(){
me.oncommand();
}
var ommand = oPopup.document.getElementById("ommand");
ommand.onclick = function(){
//this.close = true;
me.hide();
window.open(ommand.href);
}
}
/**//*
** 设置速度方法
**/
CLASS_MSN_MESSAGE.prototype.speed = function(s){
var t = 20;
try {
t = praseInt(s);
} catch(e){}
this.speed = t;
}
/**//*
** 设置步长方法
**/
CLASS_MSN_MESSAGE.prototype.step = function(s){
var t = 1;
try {
t = praseInt(s);
} catch(e){}
this.step = t;
}

CLASS_MSN_MESSAGE.prototype.rect = function(left,right,top,bottom){
try {
this.left = left !=null?left:this.right-this.width;
this.right = right !=null?right:this.left +this.width;
this.bottom = bottom!=null?(bottom>screen.height?screen.height:bottom):screen.height;
this.top = top !=null?top:this.bottom - this.height;
} catch(e){}
}
调用:
string str = "<script>showmsg('待办任务','";

str += "提醒您,您有" + count + "新邮件!<br>";
str += "','../Work/WorkList.aspx');</script>";
this.Page.RegisterStartupScript("key", str);
觉v醒 2010-07-01
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 blogtjf 的回复:]
用线程开个提醒框
[/Quote]

兄台能否具体说说
宇峰科技 2010-07-01
  • 打赏
  • 举报
回复
用线程开个提醒框
觉v醒 2010-07-01
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 wuyq11 的回复:]
http://topic.csdn.net/u/20100113/12/03671fc9-d89f-4ea3-97eb-d61cbb90c7fb.html
[/Quote]

这帖子我也关注过 也没给出解决方法。。都是在浏览器内弹消息框的
觉v醒 2010-06-30
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 kingboy2008 的回复:]
用EeekSoft PopupWin 控件
[/Quote]


这个貌似最小化也不行吧
huiyuan659 2010-06-30
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 kingboy2008 的回复:]
用EeekSoft PopupWin 控件
[/Quote]

顶,我用的这个
灵雨飘零 2010-06-30
  • 打赏
  • 举报
回复
用EeekSoft PopupWin 控件

觉v醒 2010-06-30
  • 打赏
  • 举报
回复
右下角提示框 打错了 呵呵
wan1i209 2010-06-30
  • 打赏
  • 举报
回复
这个得涉及到客户端了吧

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧