From a popup I am trying to pass back values to the parent. I have the following bit of code in a view rhtml file:
Code:
 <script language="javascript">

    function setVars(vid, particulars) {
  		if (window.opener) {
    		window.opener.document.getElementById('eda_officers_voter_id').value = vid; 
    		window.opener.document.getElementById('eda_officers_particulars').value = particulars;
    		self.close();
  		}
	}
</script>
and this bit of code that fills in the form
Code:
<%= button_to_function 'Pick Me',  onClick="setVars(list_stripes.vid ,'list_stripes.firstname list_stripes.lastname, list_stripes.residence.number list_stripes.residence.precompass list_stripes.residence.streetname list_stripes.residence.streettype list_stripes.residence.postcompass, list_stripes.residence.city list_stripes.residence.postalcode')"  %>
The problem is the syntax after the onclick event. I can't seem to get the values to appear for the "list_stripes" variables - I have tried several concatination schemes without success. Is there an easy way to do this?