我有一个由一个文本框和按钮组成的窗体。在一个按钮上单击一个弹出窗口出现,其中包含一个数据网格,我可以从中选择值, textbox(使用javascript)。在IE6和IE7中,我可以从弹出的网格中选择值,但在IE8中,Mozilla和Chrome iam无法选择。可能是什么原因。是否有人可以帮助解决此问题? 以下javascript我用来将弹出窗口中选定的值绑定到文本框。 函数回传(FieldId,fieldValue方法) {datagrid/textbox在IE 6/7中工作,但不是其他人
if (window.opener && !window.opener.closed)
{
window.opener.document.getElementById(strFieldName).value = FieldValue;
window.opener.document.getElementById(strhidFieldName).value = FieldId;
window.opener.document.getElementById(strFieldName).focus();
window.close();
}
}
function openPopup(hidfield_name,field_name,SType)
{
url = location.protocol+'//'+ location.host + '/User/Search.aspx?refId='+field_name+'&SearchType='+SType+'&hidid='+hidfield_name;
if (!newwindow.closed && newwindow.location)
{
newwindow.location.href = url;
}
else
{
GetCenterWindowParams();
newwindow=window.open(url,'winLOV', 'scrollbars=yes,resizable=yes,width=470,height=400,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
if (!newwindow.opener) newwindow.opener = self;
}
if (window.focus) {newwindow.focus()}
return false;
}
以下是我在网格的数据绑定正在呼叫的代码。
currentCell.Attributes.Add("OnClick", "javascript:PassBack('" & CType(e.Item.DataItem, DataRowView).Row(0) & "','" & str.Trim & "');")
您需要张贴一些代码... – cgreeno 2009-06-08 09:45:39