Q:

How to pass dynamic variable to opener.window.form?

How do I use a dynamic parameter name when accessing a variable?
Example:
opener.document.form.namerow_3.value  = this.cells[0].innerHTML;
opener.window.form.{varaible}.value=this.cells[0].innerHTML;

In this case, the variable would be namerow_3, which will change based on user selection. 
How do I solve the problem?

A:

If I understand your question correctly, you're trying to access a dynamic property of the form object. You can do that by accessing the object like this:
// Base example of how to access namerow_3
opener.document.form.namerow_3.value  = this.cells[0].innerHTML;

// Example with static accessor name
opener.document.form["namerow_3"].value = this.cells[0].innerHTML;

// Example with variable
var propName = "namerow_3";
opener.document.form[propName].value = this.cells[0].innerHTML;

Since most regular objects in JavaScript are basically a hashmap, you can usually access an objects property by specifying it's key like you would an array's index (in this case, form["namerow_3"]).

