NaveenB
11-23-2009, 06:42 PM
Hi All,
This is my function
function outputSelected() {
alert(window.opener.document.forms[0].txt11_19.value);
alert(window.opener.document.forms[0].rdo11.length);
var questionID = document.forms[0].cntQuestion.value;
var choiceID = document.forms[0].cntChoice.value;
var txtValue = document.forms[0].strEmpNo.value + " " + document.forms[0].strName.value;
alert(txtValue);
var leftValue = 'window.opener.document.forms[0].txt' + questionID + '_' + choiceID + '.value =' + txtValue;
eval(leftValue);
}
all the alerts work as expected. bu the eval function does not.
error: expected ';'
any ideas what is happening. or is there any other way of doing this.
This is my function
function outputSelected() {
alert(window.opener.document.forms[0].txt11_19.value);
alert(window.opener.document.forms[0].rdo11.length);
var questionID = document.forms[0].cntQuestion.value;
var choiceID = document.forms[0].cntChoice.value;
var txtValue = document.forms[0].strEmpNo.value + " " + document.forms[0].strName.value;
alert(txtValue);
var leftValue = 'window.opener.document.forms[0].txt' + questionID + '_' + choiceID + '.value =' + txtValue;
eval(leftValue);
}
all the alerts work as expected. bu the eval function does not.
error: expected ';'
any ideas what is happening. or is there any other way of doing this.