can we substitute like this in JSP?

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?!
[225 byte] By [thiyagarajanpalanisamya] at [2007-10-3 4:41:37]
# 1
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;
evnafetsa at 2007-7-14 22:45:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanx yaar......it was really superb...timely help...
thiyagarajanpalanisamya at 2007-7-14 22:45:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...