title: Colorbox - Prevent parent page reload when removing custom iframe within colorbox content?
body: <p>Colorbox provides specific methods for loading an iframe as its content, and when that kind of colorbox popup is closed, the parent page doesn't reload or refresh at all.</p>
  
  <p>However, in my use case, I need to append/add a custom iframe element inside the open colorbox, without swapping the colorbox contents. The already open colorbox content is purely inline HTML - no iframes present whatsoever. The contents of this new custom iframe is a an ajaxified commenting form that only works when loaded as its own page - or in a fully qualified iframe element.</p>
  
  <p>My function that adds the <code>iframe</code> below when a link within the colorbox contents is clicked:</p>
  
  <pre><code>$('#cboxLoadedContent').append('&lt;IFRAME frameborder="0" src="'+url+'" id="loadednode"&gt;');
  </code></pre>
  
  <p>Now I can get that to work no problem - the <code>IFRAME</code> gets inserted and goes through the normal loading process for its content and displays everything perfectly.</p>
  
  <p>The only problem is, as soon as I click "out" of this loaded colorbox by using the close button or clicking on the overlay, <em>unlike exiting colorbox-native iframe contents</em>, the parent/top page suddenly reloads!</p>
  
  <p>How do I prevent this from happening? What makes the colorbox-native iframes avoid a page refresh when removed, but iframe I've added to colorbox content cause parent page reloads when removed?</p>
  
  <p>For reference, I can load the page that is the content of the iframe as a colorbox-native iframe, and when exited it doesn't cause a page reload, so the problem is not the contents of the iframe in either case - it must be in the way colorbox removes a colorbox-processed iframe vs. a non-colorbox-processed iframe.</p>
  
  <p>Some speculations:</p>
  
  <ul>
  <li>Does not having a "name" attribute or having a fixed "id" attribute cause issues?</li>
  <li>If the iframe was including in the intial inline HTML without a "src" attribute, but then it gets that "src" path when clicked, will that avoid these problems?</li>
  <li>Is there an alternative way to say "load this iframe in the colorbox I am looking at without removing the HTML contents that are already there"?</li>
  </ul>
  
  <p>I am using (old versions because Drupal 6 is not compatible with newer):</p>
  
  <ul>
  <li>jQuery 1.3.2</li>
  <li>Colorbox v1.3.18.1 (<a href="http://www.jacklmoore.com/colorbox/" rel="nofollow">http://www.jacklmoore.com/colorbox/</a>)</li>
  </ul>