是这样得,一个列表。表中有很多服务器名称、IP之类得,现在我想对它们更新,是通过在其中一列中加入了Iframe,现在我想通过单击一个按钮,然后iframe就自动执行

解决方案 »

  1.   

    我现在想实现自动更新功能,首先我取得一个列表,列表中显示服务器得名称、IP地址等等,其中有一列是引用了iframe,这个iframe就是用来实现上传并显示进度条得功能,现在我通过<input type='file'>来实现,然后单击一个按钮,我想通过单击这个按钮来触发iframe显示它得进度条信息
      

  2.   

    你按钮加个onclick = ShowSending(true) 
    function ShowSending(val) 
    {
    if (val==true) document.all.Sending.style.visibility = "visible";
    else document.all.Sending.style.visibility = "hidden";
    }
      

  3.   

    按钮上已经有个click事件了,再加就报错了
      

  4.   

    robertlvqing(Help You As Help Me) ?
      

  5.   

    lr.Cells.Add(new LsCell("<input type='checkbox' name='Select"+(i+1).ToString()+"' id='Select"+(i+1).ToString()+"'/>"));
    string url1="http://……/……/……/upload.aspx";    //上传页面
    lr.Cells.Add(new LsCell("<iframe id='Update' name='Update' src='"+url1+"' frameborder='no' width='100%' height='40px' scrolling='no'></iframe>"));
    private void Upload_Click(object sender, System.EventArgs e)
    {     string fileName=this.file.PostedFile.FileName;
    string newName=this.fileNewName+DateTime.Now.ToString().Replace(" ","").Replace(":","").Trim();
    newSize=this.file.PostedFile.ContentLength; SortedList sl=GetServerList(Request.MapPath(Request.ApplicationPath+@"/config/ServerList.cfg"));
    for(int i=0;i<sl.Count;i++)
    {
    if(Request["Select"+(i+1).ToString()]=="on")
    {
                                              //这个地方就是要触发执行iframe了                                      }                           }}
      

  6.   

    robertlvqing(Help You As Help Me) ,能看明白不?
      

  7.   

    if(Request["Select"+(i+1).ToString()]=="on")
    这个是判断checkbox是否选中,如果选中了,就对这台服务器进行更新
      

  8.   

    你那个Upload_Click 是在哪里响应的  
    另外 http://……/……/……/upload.aspx 是干嘛用得
      

  9.   

    Upload_Click 就在这个页面上调用啊,http://……/……/……/upload.aspx 就是iframe的src
      

  10.   

    robertlvqing(Help You As Help Me) ,你有没有msn或者QQ啊?可不可以告诉我?这样讲好累啊,