i’m using a pop-up page to select data and populate the parent page, but i want to set read only to the populated inputs
function SendInfo(name) {
window.opener.document.form_name.input_name.value = name;
//here i want to use something like this
inputEnable(“input_name”, true);
}
where
function inputEnable(id,state) {
var divObj = null;
if (document.getElementById) {
divObj = document.getElementById(id);
} else if(document.all) {
divObj = document.all(id);
} else if (document.layers) {
divObj = document.layers[id];
}
if(divObj) {
divObj.readOnly = state;
}
}
my question is : can that function be modified so it would work in another page??