C
Craig G
i have the following jscript function
function OpenLookup(idname, lookupName, postBack)
{
var strReturn;
strReturn=window.showModalDialog('frmLookup.aspx?LOOKUP=' + lookupName +
'&PROFESSION=' + document.getElementById('txtProf').value
,null,'status:no;dialogWidth:520px;dialogHeight:375px;dialogHide:true;help:n
o;scroll:no');
window.alert(idname); --this is just me checking the idname
if (strReturn != null) document.getElementById(idname).value=strReturn;
}
the problem occurs in that the final statment can never find the control in
question. if i substitute idname with the actual field name it works fine.
why does it not recognise the value held within idname?
function OpenLookup(idname, lookupName, postBack)
{
var strReturn;
strReturn=window.showModalDialog('frmLookup.aspx?LOOKUP=' + lookupName +
'&PROFESSION=' + document.getElementById('txtProf').value
,null,'status:no;dialogWidth:520px;dialogHeight:375px;dialogHide:true;help:n
o;scroll:no');
window.alert(idname); --this is just me checking the idname
if (strReturn != null) document.getElementById(idname).value=strReturn;
}
the problem occurs in that the final statment can never find the control in
question. if i substitute idname with the actual field name it works fine.
why does it not recognise the value held within idname?