下面这是问题的描述。。login.jsp index.jsp video.jsp 其中 video页面 放了一个组件 具体代码是
<div id="sidebar02">
<div id="video">
<object classid="clsid:347567CC-6E12-4D94-B340-28F34981B6C7"
width="640" height="480" id="dthtId" name="Alarm">
</object>
</div>
</div>
index.jsp 页面引用了 video.jsp页面 。代码如下region: 'center',
        xtype: 'tabpanel',
        width:820,
        autoScroll: true,
        activeTab: 0,
        items: [{
         id:'spll',
            title: '视频浏览',
            autoScroll: true,
            html : '<iframe id="spll" src="afpt ideo.jsp" name = "spll" width="100%" height="100%" scrolling="yes"></iframe>'我现在需要的是。。当登陆的时候 获取到video 页面组件的控件方法。。有什么办法么。

解决方案 »

  1.   

    video.jsp 页面是iframe进入index.jsp页面吗?
      

  2.   

    恩。是的。并且那个组件放在 video 页面的两个层里面
      

  3.   


    在index.jsp上面写document.getElementById('video.jsp iframe的id').document.getElementById('dthtId')
      

  4.   

    iframe 的ID 是spll 能具体点么。我有点不明白。谢谢了。!
      

  5.   


    就是index.jsp里面的iframe啊你index.jsp不是iframe进来的video.jsp吗就那个iframe标签上的id
      

  6.   

    这个是知道。我是想请教下 语句是怎么写的。。是这样么
    document.getElementById('video.jsp?param=spll').document.getElementById('dthtId')
      

  7.   

    <iframe src="video.jsp"></iframe>
    你看你index.jsp页面里是不是有这个标签然后给你这个标签上加个id,这块id写什么
    document.getElementById('video.jsp?param=spll').document.getElementById('dthtId')
    这句js第一个那块就写什么~·就是红色的地方
      

  8.   

    谢谢了。虽然我还是一头雾水的。。!很感谢你。。其实就是不知道语句怎么写。。id:'spll',
                title: '视频浏览',
                autoScroll: true,
                html : '<iframe id="spll" src="afpt/video.jsp" name = "spll" width="100%" height="100%" scrolling="yes"></iframe>'这个是用到iframe 的地方 也有ID。。
      

  9.   


    嗯 就是这个splldocument.getElementById('spll').document.getElementById('dthtId')
    这么写
      

  10.   

    id:'spll',
    title: '视频浏览',
    autoScroll: true,
    html : '<iframe id="spll" src="afpt/video.jsp" name = "spll" width="100%" height="100%" scrolling="yes"></iframe>'
    你这个js什么时候加载到页面上?
      

  11.   

    Ext.onReady(function(){     Ext.QuickTips.init();
         var menuHtml = document.getElementById("sidebar01").innerHTML;
         new Ext.Viewport({
        layout:'border',
        width:1024,
        items: [
         new Ext.BoxComponent({ 
                    region:'north',
                    el: 'header',
                    height:69
             }), {
            region: 'west',
            collapsible: true,
            xtype: 'panel',
            split:true,
            title: date,
            width:191,
            html:menuHtml
        }, {
            region: 'center',
            xtype: 'tabpanel',
            width:820,
            autoScroll: true,
            activeTab: 0,
            items: [{
             id:'spll',
                title: '视频浏览',
                autoScroll: true,
                html : '<iframe id="spll" src="afpt/video.jsp" name = "spll" width="100%" height="100%" scrolling="yes"></iframe>'
            },{
                id:'ywgz',
                title: '业务规则设定',
                autoScroll: true,
                html : '<iframe id="ywgz" src="afpt/rule.jsp" name = "ywgz" width="100%" height="100%" scrolling="yes"></iframe>'
            },{
                id:'lxrgl',
                title: '联系人管理',
                autoScroll: true,
                html : '<iframe id="lxrgl" src="sys/contactPeopleAction?resource=af010402" name = "lxrgl" width="100%" height="100%" scrolling="yes"></iframe>'
            },{
                id:'xtpz',
                title: '用户管理',
                autoScroll: true,
                html : '<iframe id="lxrgl" src="sys/employeeAction?resource=af010401" name = "xtpz" width="100%" height="100%" scrolling="yes"></iframe>'
            },{
                id:'zysjpz',
                title: '资源数据配置',
                autoScroll: true,
                html : '<iframe id="lxrgl" src="sys/ConfigAction!queryResource.action?resource=zy010305" name = "zysjpz" width="100%" height="100%" scrolling="yes"></iframe>'
            }]
        }]
    });
        
        })
       我也试过了。当index 加载的时候 video 的onload 事件 不执行
      

  12.   

    纠结啊。!哎。公司技术不程序 。EXT 没用过。。
      

  13.   

    document.getElmentById("iframeID").contentWindow.document.getElmentById("objID");
    必须在iframeID加载完之后执行
    document.getElmentById("iframeID").onload=function(){
    //.....获取对象
    }