SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: Help with button_to_function
-
May 13, 2006, 09:17 #1
- Join Date
- Nov 2004
- Location
- Victoria BC
- Posts
- 116
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Help with button_to_function
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>
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')" %>
Ruby, Ruby when will you be mine
-
May 15, 2006, 16:23 #2
- Join Date
- Nov 2004
- Location
- Victoria BC
- Posts
- 116
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Found the solution. No need to answer.
Ruby, Ruby when will you be mine
Bookmarks