1

I have Page A (page A ) and page B ( page B ) which is to be opened by page A .

What I'm trying to accomplish is to have page B start a colorbox gallery and when the colorbox gallery is closed that page B colorbox come back up.

Problem 1: If you click on a thumbnail from page B (colorboxed) a colorbox photo shows up but the gallery is not functional.

Problem 2: If you close the gallery, page B doesn't come back. Instead you're brought back to page A.

Page A has the following code to reopen page B upon closing of colorbox gallery:

/* _photourl is the picture url,   */
/* _photorel is the group name,    */
/* _parenturl is the url of page B */

function showColorboxGallery(_photourl, _photorel, _parenturl) {
   $.colorbox(
         {
            scrolling: false,
            href: _photourl,
            rel: _photorel,

            onClosed: function () {
            parent.$.colorbox({
                href: _parenturl, 
                iframe: true, 
                width: 960, 
                height: 418
            });
                return;
            }
         }
   );
   return;
}

Page B uses the following to open a gallery upon clicking on any thumbnail:

onclick="parent.showColorboxGallery('http://www.abc.com/photo.jpg', 
                                    'photosanimal', 
                                    'Full_URL_of_HTML_Page_B')"

What am I missing or doing wrong? Any suggestion?

4

0 回答 0