function test(){var sample = arguments[0];window.opener.document.testForm.sample.value = str;}can we do like this? r else how can i substitue the control name?PLs help me out?!
You are talking javascript rather than java/jsp but I believe the following would work using square bracket notation:window.opener.document.testForm[sample]value = str;