框架页面中,包含main和msg,我想在msg的页面中使用popupWin,但是想显示在main页面中,该如何做?(
--------------------
| |
| msg |
|-------------------|
| |
| |
| main |
| |
| |
--------------------
如上所画的框架页中,msg中指定了页面msg.aspx,用于定期刷新判断有无新消息,
页面中放了一popupWin的控件,但是显示时,它是在msg.aspx中显示的,我想在main中显示该如何实现?
------解决方案--------------------很简单,三部即可
1、把popupWin的ActionType设置为OpenLink;
2、输入Link的内容;如(http://www.baidu.com/);
3、把popupWin的LinkTarget设置为main的名称(默认是mainFrame)。
------解决方案--------------------这个应该没有办法,你只能把PopupWin放在main里!
------解决方案--------------------楼主的问题用那个控件应该没办法解决吧.
可以考虑用我的方法:新建一个消息窗口,在脚本里写上:
<script language= "javascript ">
window.resizeTo(220,210);
var windowW=220 // wide
var windowH=210 // high
var Yoffset=0 // in pixels, negative values allowed
var windowStep=2 // move increment (pixels)
var moveSpeed=12 // move speed (larger is slower)
Xoffset=25;
var windowX = (screen.width/2)-(windowW/2);
windowX=screen.availWidth-Xoffset-windowW;
var windowY = (screen.availHeight);
var windowYstop = windowY-windowH-Yoffset;
var windowYnow = windowY;
window.focus ();
resizeTo(windowW,windowH);
moveTo(windowX,windowY);
function movePFW()
{
if (document.all)
{
if (windowYnow> =windowYstop){
moveTo(windowX,windowYnow);
windowYnow=windowYnow-windowStep;
timer=setTimeout( "movePFW() ",moveSpeed);
}
else
{
clearTimeout(timer);
setTimeout( "moveBack() ",120000 )
moveTo(windowX,windowYstop);
}
}
else
{
moveTo(windowX,windowYstop);
}
}
function moveBack()
{
if (document.all)
{
if (windowYnow <=windowY)
{
moveTo(windowX,windowYnow);
windowYnow=windowYnow+windowStep;
timer1=setTimeout( "moveBack() ",moveSpeed);
}
else
{
clearTimeout(timer1);
moveTo(windowX,windowY);
self.close()
}
}
else
{
moveTo(windowX,windowYstop);
self.close()
}
}
function See()
{
window.opener.parent.main.location= "你的页面地址 ";
window.close();
}
</script>