注册 登录
编程论坛 ASP.NET技术论坛

关于<iframe>的问题,请教一下

firehood 发布于 2007-12-19 13:43, 1070 次点击
问题是这样:
一个空白网页,上面设置了左右两个〈iframe〉,左边的〈iframe〉中传入的是是一个treeview的导航页,然后点击左边的treeview上的节点,我要求相应的网页在传入右边的的〈iframe〉中,这些都能实现,现在的问题是我想点击导航区域的相应项,使有一个新的网页出来,现在出的问题是点击导航区域的相应项要么出现在左边的〈iframe〉中,要么出现在右边的〈iframe〉,中,不能弹出新的 网页。
不知道我把问题叙述清楚了没有。
请大家指点一下
5 回复
#2
菜鳥弎魛2007-12-19 17:26
没看见你代码呢
你看看是不是你没有写javascript
#3
cyyu_ryh2007-12-19 17:29
我还没用iframe传过值
#4
firehood2007-12-19 20:06
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
    {
        string strValue = this.TreeView1.SelectedValue;
        

        Response.Write(@"<script type='text/javascript'>");
        
        switch(strValue)
        {
            case "NtcAdd":
                Response.Write(@"top.window.frames('iframe4').location='ntcAddWeb.aspx';");
                break;
            case "NtcMag":
                Response.Write(@"top.window.frames('iframe4').location='NtcMagWeb.aspx';");
                break;
           
            case "ReviewRes":
                Response.Write(@"top.window.frames('iframe4').location='ReviewResWeb.aspx';");
                break;
            case "SetRes":
                Response.Write(@"top.window.frames('iframe4').location='SetResWeb.aspx';");
                break;
            case "DocmMag":
                Response.Write(@"top.window.frames('iframe4').location='DocmMagWeb.aspx';");
                break;
        
        }
        Response.Write(@"</script>");

    }
这个程序可以实现把网页传入iframe4,其中TreeView1专门做了网页传入iframe3中,但是我想
选择导航条中的某值时,跳出新的网页,试了好多中方法,都没有成功,望指点一下
#5
cquxiongyunlong2007-12-20 19:58
只需将导航TreeView中的Target设置为_blank即可。
#6
loveling2007-12-27 09:04
TreeView  在哪有啊
1