How to trigger / launch a colorbox programatically?
Install colorbox module. Read its README.txt to find out how to build links for loading inline and iframe content in a colorbox.

Set the id #cbox_trigger_on_page_load for your link and place it somewhere in your page and hide it with CSS.

If you are loading inline content, place the content in a block and hide the block too with CSS.

The mechanics of how to place the hidden colorbox link on the right page is not really what the question is about, is it?

So, lets stick with how to trigger the colorbox.

/**
 * Implements hook_preprocess_html();
 */
function MYMODULE_preprocess_html(&amp;$variables) {
  // The overlay content from the site in an iframe should have cbox_overlay
  // as first path argument.
  // i.e. http:/mywebsite.com/cbox_overlay/content-title.

  // This will prevent a triggering loop.
  $is_cbox_overlay = FALSE;
  if (arg(0) == 'cbox_overlay') {
    $is_cbox_overlay = TRUE;
  }

  $settings = array(
    'is_cbox_overlay' =&gt; $is_cbox_overlay,
  );
  drupal_add_js(array('MYMODULE' =&gt; $settings), array('type' =&gt; 'setting'));

  drupal_add_js(drupal_get_path('module', 'MYMODULE') . '/js/colorbox_onpageload.js', array( 
    // Making sure our JQuery code runs after colorbox's.
    'scope' =&gt; 'footer', 
    'weight' =&gt; '15' 
  ));
}


In the /js/colorbox_onpageload.js file:

(function ($) {  
  Drupal.behaviors.MYMODULE = {
    attach: function (context, settings) {            
      if (!settings.MYMODULE.is_cbox_overlay &amp;&amp; $('#cbox_trigger_on_page_load').length) {
        $('#cbox_trigger_on_page_load')[0].click();
      }
    }

};})(jQuery);