I decided I want to take this quiz... here is my guess: The ampersand after id=' needs to be a plus sign. Am I right?
I've never had problems putting multiple inline JavaScript statements in one onClick YMMV... <input type="button" onClick="window.opener.document.location.href='parent.cfm?id=' + document.forms.popupform.resid.value; self.close();" value="Submit"> Thanks! Christine Davis ColdFusion Lead Nations Technical Services Prairie Village, KS 913-748-8044 ext 4703 [EMAIL PROTECTED] -----Original Message----- From: Snake [mailto:[EMAIL PROTECTED] Sent: Thursday, October 26, 2006 11:29 AM To: CF-Talk Subject: RE: form target I suggest you call a single fucntion with your onlclick, as putting multiple statements inline often doesn't work. Russ -----Original Message----- From: Ken [mailto:[EMAIL PROTECTED] Sent: 26 October 2006 17:14 To: CF-Talk Subject: Re: form target Thanks guys. However, instead of passing the variable through a form variable, i decided to send it in the url. But its not working either. Here's my code. Please tell whats wrong in it: <form name="popupform"> 1 <input type="radio" name="resid" value="1" checked="checked" /><br /> 2 <input type="radio" name="resid" value="2" /><br /> 3 <input type="radio" name="resid" value="3" /> <br /> <br /> <input type="button" onClick="window.opener.document.location.href='parent.cfm?id=' & document.forms.popupform.resid.value; self.close();" value="Submit"> </form> Thanks, Ken On 10/26/06, Bobby Hartsfield <[EMAIL PROTECTED]> wrote: > Maybe I'M the one who should have been a little clearer. Passing > something... anything... from the popup window to the parent is not a > problem. > window.opener.document.getElementById('somediv').innerHTML = > document.forms.popupform.popupfield.value; > > that would take the value of a field in the popup windows form and put > it in a div tag in the parent called 'somediv' > > window.opener.document.forms.parentform.parentfield.value = > document.forms.popupform.popupfield.value; > > that would take the SAME value as before and place it in a form field > on the parent page. > > If you had to submit the parent afterwards, soemthign like this should > do it. > > window.opener.forms.parentform.submit(); > > ... I think. I haevn't tested it (or any of this for that matter. Im > sure its riddled with typos > > > But I guess the question should be... what exactly to you hope to do > with the value once its gotten to the parent... > > > -----Original Message----- > From: Ken [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 26, 2006 11:32 AM > To: cf-talk@houseoffusion.com > Subject: Re: form target > > Ok. What i want to do is this: > > From the popup window, on submit I want to pass the value of a field > to the parent window, then close the pop-up. > > I hope the above clears any doubts about what i need. > > On 10/26/06, Coldfusion <[EMAIL PROTECTED]> wrote: > > Try something like this: (did not test it) > > > > <form target="_parent" onSubmit="SubmitMyForm()"> > > > > <script type="javascript"> > > SubmitMyForm(){ > > document.forms[0].submit(); > > self.close(); > > } > > </script> > > > > > > > > -----Original Message----- > > From: Ken [mailto:[EMAIL PROTECTED] > > Sent: Thursday, October 26, 2006 10:11 AM > > To: CF-Talk > > Subject: form target > > > > Sorry guys. I think I missed my morning coffee. I'll just re-phrase > > my question. Please ignore previous post. Here goes: > > My page opens a pop-up window (a cfm page). From there I want to > > submit a form to the first page, the base window, and once that is > > done, I want to close the pop-up. > > Please help. > > > > Thanks, > > K > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258139 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4