title: Getting data back from a Bootstrap modal
body: <p>I have a signup page that triggers a modal window (using <a href="http://twitter.github.io/bootstrap/javascript.html#modals" rel="noreferrer">Bootstrap</a>) containing for example a Facebook login and I want this modal to pass back data (errors, or if success the token / user data) to the main window so I can fill the relevant form fields and let the user complete the signup process (tick the "I approve the terms and conditions" box etc.).</p>
  
  <p>I know how to do all of it except the bit about sending data back when the modal closes. Is there a way to pass data from the modal to the main window on the modal close event?</p>
  
  <p>EDIT: here is a visual representation of what I want to accomplish:
  <img src="https://i.stack.imgur.com/xBS9M.jpg" alt="flow"></p>