title: Submitting form with Jquery Fancybox and then appending value into parents text field
body: <p>I have a jQuery auto-complete field that selects clients email adddress's. Next to that is a button that allows the user to create a new client. To avoid the clients being taken away from their already half filled form I am opening the form within a lightbox. 
  Enter jQuery Fancybox.</p>
  
  <p>The new client add form is located within a jQuery FancyBox (so it is actually an external page in an iframe).</p>
  
  <p>Once the user submits the form they are redirected to a page page with <code>parent.$.fancybox.close();</code> script which then closes the fancybox</p>
  
  <p><em>I doubt this is a great way to close the lightbox. Ideally I would like the action to be fired from the submit button but then I have to take into consideration what happens if the form fails server end validation... Anyway, Moving onto my main problem</em>.</p>
  
  <p>Assuming the user was added successfully, I now would like their name and email address to be automatically inserted into the original auto-complete field back on the parent page.</p>
  
  <p>This would involve some sort of interaction between frames, something I have no idea about and something Google hasn't been able to help me with either.</p>
  
  <p>Is this possible? If this is could you please give me an example or point me in the right direction.</p>
  
  <p>Here is some code to give you a rough idea of the parent page that calls the fancybox lightbox and ultimately needs the email and name of the newly created user passed back to it.</p>
  
  <pre><code>&lt;tr id="client-add"&gt;
   &lt;td&gt;Billing Client:&lt;/td&gt;
   &lt;td&gt;&lt;input type="hidden" value="" name="client_id" /&gt;&lt;input type="text" id="addClient" name="client_name" value="" style="width: 200px;" /&gt;&lt;red&gt;*&lt;/red&gt; &lt;a class="iframe" href="/clients/add_lightbox"&gt;&lt;img src="/images/16x16/user_add.png" border="0"/&gt; Create New Client&lt;/a&gt;
   &lt;/td&gt;
  </code></pre>
  
  <p>
  Thankyou.</p>
  
  <p>Tim</p>