本帖最后由 lujun198206 于 2010-07-14 09:56:43 编辑

解决方案 »

  1.   

    txt_Subject和txt_Contents是在homePage_1.aspx里面的吗?
      

  2.   

     Ext.ux.IFrameComponent 没有用过这个扩展组件,可以直接在页面中嵌入了一个iframe
    window.iframe["homePage"].document.getElementById("txt_Subject");
    window.iframe["homePage"].document.getElementById("txt_Contents");
      

  3.   

     txt_Subject和txt_Contents是 是在mailWrite.aspx 页面上
      我在index 进入js 发现能获取index.aspx控件的值  如果我要获取mailWrite.aspx 的值怎么写?2楼的方法 我试了下 他报window.iframe.iframe_writeMailID找不到、function mainMailTreeActive_writeMail(mainTab, closableBool, url) {
        var tab = centerTab.getComponent('writeMailID');
        var tabLength = centerTab.items.length;    if (!tab) {
            if (tabLength >= 10) {
                Ext.MessageBox.alert("系统提示", "<br/>为了不影响操作,建议您不要打开10个窗口以上");
                return;
            } else {
                tab = mainTab.add({
                    'id': 'writeMailID',
                    'title': '写邮件',
                    closable: closableBool,
                    autoScroll: true,
                    layout: 'fit',
                    items: [new Ext.ux.IFrameComponent({ id: 'writeMailID', url: url })]
                });
            } 
        }
        var arr = document.getElementsByTagName("iframe");
        for (var i = 0; i < arr.length; i++) {
            if (arr[i].id == 'iframe_writeMailID')
                arr[i].src = url;
        }
        mainTab.setActiveTab(tab);
    }
      

  4.   

      items: [new Ext.ux.IFrameComponent({ id: 'homePage', url: 'homePage_1.aspx',region:'center' })]
    可以直接写html:'<iframe id="" src=""></iframe>'
    new Ext.ux.IFrameComponent这个没玩过
      

  5.   


    new Ext.ux.IFrameComponent({ id: 'writeMailID', url: url })
    既然这个是个iframe那么他有没有name或id
    如果是id就用window.document.getElementById("frameId").document.getElementById("frame 页面的表单域")
    如果有name就window.frames['frameName'].document.getElementById("frame 页面的表单域")
      

  6.   

    我用了window.document.getElementById("writeMailID").document.getElementById("txt_Subject") 还是找不到
      

  7.   

    照理说我已经得到了当前对象component
    component.document...应该能取到啊?