有两个页面。
1.aspx:<iframe src="UP.aspx" scrolling="no" width="710" />
<asp:TextBox ID="pictitle" runat="server" Width="150px"></asp:TextBox>
<FCKeditorV2:FCKeditor ID="neirong" runat="server" BasePath="/Fckeditor/" 
Height="500px" ToolbarSet="default" Width="680px">
</FCKeditorV2:FCKeditor>up.aspx页面中有一些按钮。根据点击的按钮的不同分别把一个值赋给1.aspx中的pictitle或neirong控件。
使用下面这两个不好使。PicTitleID是1.aspx中pictitle的客户端ID,这个取值没有错。
onclick=window.opener.document.getElementById('" + PicTitleID + "').value='1111';
onclick=window.opener.document.from1." + PicTitleID + ".value='1111';
出现这个错误:window.opener.document为空或不是对象
麻烦大家帮忙看看。另外还有就是点击按钮后在neirong控件里增加一段代码这个应该怎么弄?FCKeditorV2控件生成到客户端的好像也是个Iframe。
麻烦有弄过的帮忙看一下。谢谢了!!

解决方案 »

  1.   

    必须从1.aspx页面打开up.aspx页面
      

  2.   

     parent.document.all.inputname.value="abc";     
      

  3.   

    我用的,后台代码给父窗口中tbxEmName控件赋值Response.Write(" <script language=\"javascript\">window.opener.document.all('tbxEmName').value = '" + sName + "'; </script>");
      

  4.   

    我这个是用在发布新闻时候上传图片的。iframe里是上传和传完之后查看已存在的图片的页面。这样做其实也是想在1.aspx里使用AJAX。如果使用AJAX的话上传那部分总是出错。