两个iframe的传值问题
我有一个html页面
里面有两个iFrame
我想实现在左边的leftframe(left.aspx)
中让用户输入查询条件,而rightfram(right.aspx)中显示结果
right.aspx中有个datagrid,
这是left.asp的javascript的代码
<script language="javascript">
function LToR()
{
//alert("left is submit");
window.parent.frames.item('rightF').location.href="right.aspx?name="+document.Form1.all["TextBox1"].value;
//页面刷新,但是不能提交到服务器,服务器控件都不显示啦,好象部能保持状态
//window.Form1.action="right.aspx?name=aa";
//window.Form1.target="rightF";
//window.Form1.submit();
}
请高手解答!
问题点数:0、回复次数:10Top
1 楼net_lover(【孟子E章】)回复于 2004-04-02 13:03:35 得分 0
你可以提交到左边,处理后进行
Response.Write("<script>window.open('xxx.aspx?name=xxx','rightIframeName')</script>")Top
2 楼net_lover(【孟子E章】)回复于 2004-04-02 13:07:32 得分 0
你的方法也是可以的
window.parent.frames['rightF'].location.href="right.aspx?name="+document.all["TextBox1"].value;Top
3 楼reaperwu(过程、方法、人)回复于 2004-04-02 13:09:04 得分 0
left.aspx
string Url = "AdvancedSearchResult.aspx?";
Url += "StaffStatusID=" + rblStaffStatus.SelectedValue.Trim();
Url += "&PostTitleID=" + ddlPostTitle.SelectedValue.Trim();
Page.RegisterStartupScript("", "<script language='javascript'>showModalDialog('"+ Url +"',null,'dialogHeight:700px;dialogWidth:900px;scroll:no;status=no');</script>");
right.aspx
Request["StaffStatusID"]
Request["PostTitleID"]Top
4 楼cwzb(没有耳多)回复于 2004-04-02 13:22:33 得分 0
window.parent.frames['rightF'].document.控件ID.value="值";
试试。或许可以。Top
5 楼qynum123()回复于 2004-04-02 13:25:22 得分 0
在左边点击的事件中填加:
Response.Write("<Script>window.parent.frames['rightF'].location.href='right.aspx?name='+document.all['TextBox1'].value</" + "script>")Top
6 楼softstore(郁闷)回复于 2004-04-02 13:49:15 得分 0
奇怪,我传参数如果是三个字另外一个页面只能取两个字
如果参数是单数,只能得到双数(汉字有这个现象)
比如传"持方的",得到只能是“持方”
传
string strScript="<script>window.open('employee.aspx?name="+TextBox1.Text.ToString()+"','rightF')</script>";
取
selectStr="select * from T_Employee where name='"+Request.QueryString["name"].ToString()+ "'" ;
}Top
7 楼changziyu(振翅雄鹰 (哈)ACCP010182)回复于 2004-04-02 13:55:31 得分 0
向五颗星学习。在布局中设定左右的名称。
qynum123()
Response.Write("<Script>window.parent.frames['rightF'].location.href='right.aspx?name='+document.all['TextBox1'].value</" + "script>")的方法可以。
Top
8 楼softstore(郁闷)回复于 2004-04-02 14:07:10 得分 0
奇怪,我传参数如果是三个字另外一个页面只能取两个字
如果参数是单数,只能得到双数(汉字有这个现象)
比如传"持方的",得到只能是“持方”
传
string strScript="<script>window.open('employee.aspx?name="+TextBox1.Text.ToString()+"','rightF')</script>";
取
selectStr="select * from T_Employee where name='"+Request.QueryString["name"].ToString()+ "'" ;
}
Top
9 楼softstore(郁闷)回复于 2004-04-02 14:43:39 得分 0
奇怪,我传参数如果是三个字另外一个页面只能取两个字
如果参数是单数,只能得到双数(汉字有这个现象)
比如传"持方的",得到只能是“持方”
传
string strScript="<script>window.open('employee.aspx?name="+TextBox1.Text.ToString()+"','rightF')</script>";
取
selectStr="select * from T_Employee where name='"+Request.QueryString["name"].ToString()+ "'" ;
}Top
10 楼softstore(郁闷)回复于 2004-04-02 14:54:48 得分 0
高手指点一下!!!!
高手指点一下!!!!
高手指点一下!!!!
高手指点一下!!!!
高手指点一下!!!!
奇怪,我传参数如果是三个字另外一个页面只能取两个字
如果参数是单数,只能得到双数(汉字有这个现象)
比如传"持方的",得到只能是“持方”
传
string strScript="<script>window.open('employee.aspx?name="+TextBox1.Text.ToString()+"','rightF')</script>";
取
selectStr="select * from T_Employee where name='"+Request.QueryString["name"].ToString()+ "'" ;
}
Top




