title: want to redirect to another page from colorbox iframe after closing it
body: <p>Does anyone know how to implement the following JavaScript process?
  I`m using colorbox to display iframe.</p>
  
  <ol>
  <li>I setted the banner link on colorbox iframe.</li>
  <li>I want this iframe to close when the banner is clicked, after that I want the parent window to redirect to another page.</li>
  </ol>
  
  <p>following 2 codes are what I`ve tried:　　　</p>
  
  <pre><code>1
  &lt;div&gt;  
  &lt;a href='#' onclick='parent.$.colorbox.close();linkto();'&gt;
  &lt;img src="../images/test.png" alt=“#” &gt;
  &lt;/a&gt;
  &lt;script&gt;
  function linkto() {
  location.href = "https://www.test.com";
  }
  &lt;/script&gt;
  &lt;/div&gt;
  
  2
  &lt;div&gt;  
  &lt;a href='#' onclick='parent.$.colorbox.close(); window.location.href ='https://www.test.com;'&gt;
  &lt;img src="../images/test.png" alt=“#” &gt;
  &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>