jQuery MiniUI
标题:
TAB 懒加载问题
[打印本页]
作者:
wslfriend
时间:
2013-11-1 09:16:38
标题:
TAB 懒加载问题
主页嵌入了三个TAB ,其中第三个是 <div title="附件" name="tabAttachment" url="Attachment.html" > 指向了公共页“附件”
附件tab 未激活 ,读取记录后, 触发tabLoad ,此时 top["tabAttachment"] == null 总是空,无法访问内部元素。
但如果
function onLoadAttachment(e) {
alert("OK");
//此时 top["tabAttachment"] 不为空了
}
明显感觉 onLoadAttachment 并非整个html 加载完毕后才触发的,请问有什么办法么?
作者:
felt
时间:
2013-11-1 09:46:40
onLoadAttachment 监听的是什么事件?
top["tabAttachment"] 定义的是附件那个页面吗?
作者:
wslfriend
时间:
2013-11-1 09:55:38
<div id="tabMain" class="mini-tabs" activeIndex="0" style="width:100%;height:500px" bodyStyle="pajavascript:;dding:0;border:0;" onbeforeopen="onBeforeOpen">
在 attachment.html 中,<script> 里面定义了 top["tabAttachment"] = window;
[attach]3116[/attach]
麻烦帮忙看看,谢谢
作者:
wslfriend
时间:
2013-11-1 09:57:15
上贴有误:tab定义是
<div id="tabMain" class="mini-tabs" activeIndex="0" style="width:100%;height:500px" bodyStyle="padding:0;border:0;" onbeforeopen="onBeforeOpen" ontabload="onLoadAttachment">
作者:
felt
时间:
2013-11-1 10:24:53
[attach]3117[/attach]
可以获取的
作者:
factory
时间:
2013-11-1 10:29:01
wslfriend 发表于 2013-11-1 09:57
上贴有误:tab定义是
tabs的ontabload,是针对url加载的tab项的,只有当你url项tab的iframe加载完毕了,才会触发这个事件,你写死的静态tab页肯定是不会激发的
ontabload="onLoadAttachment"
function onLoadAttachment(e) {
alert(top["tabAttachment"]);
}
如果你去激活"附件" 这一项,测试过了,能正常获取到"附件"页window的
作者:
wslfriend
时间:
2013-11-1 12:51:16
奇了怪了,无缘无故又好了。。。
删除了所有alert 成功显示。。。。
谢谢了。
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2