最近一个项目用到了greybox,使用过程中遇到不少问题,总结一下:
1.关闭遮罩层调用的方法:
<a href="#" onclick="parent.parent.GB_hide();">My Close Button</a>
2.弹出遮罩层:
<a href="http://google.com/" onclick="return parent.GB_show('Google', this.href)">Visit Google</a>
3.重新设置遮罩层显示部分的宽和高
parent.parent.GB_CURRENT.height=500;
parent.parent.GB_CURRENT.width=900;
parent.parent.GB_CURRENT.update();
4.在遮罩层刷新某页
parent.parent.iframename.iframename.location.reload();
5.弹出页关闭按钮显示的是英文Close,如果想改成中文在
gb_scripts.js中查找Close,注意C是大写的,将其换成中文;
6.如果弹出页里中table的背景色无法显示,刷新一下该页面就出来了,
彻底解决办法是将gb_scripts.js中show_loading值改为false,
页面加载时不会出的loading页了,table的背景色也会正常显示;
7.如果被加载页太高,页面侧边会出滚动条,但同时下边的滚动条也会出来,
这个问题尚未解决。