日期:2014-05-18  浏览次数:20488 次

请教大家两个关于赋值的问题
有两个页面。
1.aspx:
C# code

<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。
麻烦有弄过的帮忙看一下。谢谢了!!

------解决方案--------------------
parent.document.all.inputname.value="abc";
------解决方案--------------------
我用的,后台代码给父窗口中tbxEmName控件赋值

Response.Write(" <script language=\"javascript\">window.opener.document.all('tbxEmName').value = '" + sName + "'; </script>");