2013-09-25 63 views
0

我在包含网格的网页上使用jQuery v2.0.1,并且在页脚处有一个“Search”ImageButton。在grid_RowCommond事件中,我将使用下面的脚本在弹出窗口中显示搜索结果,当用户单击其中一个搜索结果时,选定的结果将返回到父页面的页脚行,弹出窗口将会显示关闭。我在IE10上测试了这个函数,它完美地工作,直到用户反馈他们在IE8底部看到javascript错误。仅在IE8中出现jQuery错误对象不支持此属性或方法

请帮帮我。

protected void grid_RowCommand(object sender, GridViewCommandEventArgs e) 
{ 
    if (e.CommandName == "Search") 
    { 
     TextBox txtNo = grid.FooterRow.FindControl("txtNo") as TextBox; 

     System.Text.StringBuilder s = new System.Text.StringBuilder(); 
     s.Append("<script language='javascript' id='SearchResult'> "); 
     s.Append("var WinSettings = 'dialogHeight:400px ; dialogWidth: 550px ;center: Yes ;resizable: No;status: no'; "); 
     s.Append("javascript: var windowReturnValue =window.showModalDialog('Search.aspx?car_no=" + txtNo.Text.Trim().ToUpper() + "','',WinSettings);"); 

     s.Append("$('#" + txtNo.ClientID + "').val(windowReturnValue) ;"); 
     s.Append("</script > "); 

     if ((!ClientScript.IsStartupScriptRegistered("SearchResult"))) 
     { 
      ClientScript.RegisterStartupScript(this.GetType(), "SearchResult", s.ToString()); 
     }      
    } 
} 
+0

什么是错误的IE 8支持

? – Abhitalks

回答

0

jQuery 2.x已经删除了IE8的支持,使用的是最新的1.x稳定版本的jQuery; 1.10.2

相关问题