problems with passing data from one window to another.

I have been having problems with passing data from one window to another. I can get the data to pass correctly if I change the name attribute in verse.php and the changing product_info.php to match it but for some reason it will not if I use the naming scheme id[prefix_number]. I cannot change verse.php as it will throw the rest of my site off. Is there any way to correct product_info.php?

product_info.php

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function sendValue(s){
var selvalue = s.options[s.selectedIndex].value;
window.opener.document.cart_quantity.id[txt_61].value = selvalue;
window.close();
}
// End -->
</script>
</head>

<body>

<center>
<form name=selectform>
<select name=selectmenu size="8">
<option value="Item A">Item A
<option value="Item B">Item B
<option value="Item C">Item C
<option value="Item D">Item D
<option value="Item E">Item E
<option value="Item F">Item F
<option value="Item G">Item G
<option value="Item H">Item H
<option value="Item I">Item I
<option value="Item J">Item J
<option value="Item K">Item K
<option value="Item L">Item L
<option value="Item M">Item M
<option value="Item M">Item N
<option value="Item O">Item O
<option value="Item P">Item P
<option value="Item Q">Item Q
<option value="Item R">Item R
<option value="Item S">Item S
<option value="Item T">Item T
<option value="Item U">Item U
<option value="Item V">Item V
<option value="Item W">Item W
<option value="Item X">Item X
<option value="Item Y">Item Y
<option value="Item Z">Item Z
</select>
<p>
<input type=button value="Item Select Item" onClick="sendValue(this.form.selectmenu);">
</form>

verse.php

<input type="text" name="id[txt_61]" size="32" maxlength="32" value="">
[2144 byte] By [forbushbl] at [2007-11-19 7:42:14]
# 1 Re: problems with passing data from one window to another.
To reference the id, use this instead:window.opener.document.cart_quantity['id[txt_61]'].value = selvalue;Dr. Script
Dr. Script at 2007-11-8 0:20:46 >
# 2 Re: problems with passing data from one window to another.
Thanks, that fixed my problem! I thought it might be looking for an array but I didn't know how to make javascript look at it as a literal name.

One more question, what if I would like to send more than one line from verse.php to more than one line in product_info.php using the one submit button. Can I just modify the function sendValue(s)? If so, how do I do it? I know that it is probably really simple but I am not a javascript guru. I work mainly with PHP. Thanks again!
forbushbl at 2007-11-8 0:21:54 >
# 3 Re: problems with passing data from one window to another.
It is possible. I'm just not sure I understand enough to provide any code ...
Dr. Script at 2007-11-8 0:22:49 >