hi guys, I have a form consisting of one textbox and button.On clicking on button one popup appears which contains one datagrid from which i can select value ,such that value appears in textbox(using javascript).In IE6 and IE7 ,i can select value from grid in popup,but in IE8,Mozilla and chrome iam not able to select.What may be the reason.Can anybody help to solve this issue? Following javascript i used to bind value selected in popup to textbox. function PassBack(FieldId,FieldValue) {
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;
}
Following is the code which i am calling in the databound of the grid.
currentCell.Attributes.Add("OnClick", "javascript:PassBack('" & CType(e.Item.DataItem, DataRowView).Row(0) & "','" & str.Trim & "');")