Thanks for the help, this is a good start as it lets me hook into
shadowbox load, but I'm still stuck with the other side of the
problem.  What I need to do is grab the width and height of an element
contained within the iFrame and resize the elements that contain the
iFrame based on those sizes.  As the iFrame is displaying content from
off-site it's causing a permission denied error (or at least I think
that's what's causing it).

On Sep 5, 9:52 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Maybe you can use the onFinish 
> callback:http://mjijackson.com/shadowbox/doc/api.html
>
> $(window).load(function(){
>
>     var options = {
>             onFinish:function() {
>  // do what you want here
>             // resize the shadowbox etc...
>        }
>     };
>
>     Shadowbox.init(options);
>
> });
>
> On 5 Sep., 10:15, Gordon <[EMAIL PROTECTED]> wrote:
>
> > Can nobody help out with this?
>
> > On Sep 3, 12:06 pm, Gordon <[EMAIL PROTECTED]> wrote:
>
> > > On our website I am using a shadowbox to view videos hosted on another
> > > site in the product page window.  The problem is that recently the
> > > company hosting the videos have started providing several different
> > > size of videos.
>
> > > All the different video pages, however, have an element with an ID of
> > > container as the only child of the body element (in 2 cases it's a
> > > table, in a third a div, but all have an id of container).  I found
> > > that if I can manually resize the shadowbox by getting the clientwidth
> > > and clientheight of the #container element and setting the width and
> > > height of the shadowbox to these values I can get the shadowbox to
> > > perfectly contain the video without excess space.
>
> > > The problem is that I can't find a way of grabbign the width and
> > > height from within a script and applying the new size.  I tried typing
> > > $('#shadowbox_content').content().find ('#container') into the firebug
> > > console and got a permission denied error.
>
> > > Additionally, the iFrame doesn't exist until the shadowbox opens, so I
> > > need to find a way to get the iframt content when the iframe loads but
> > > to do it wit han iframe that doesn't exist until the containing
> > > shadowbox opens.
>
> > > Can anyone help?
>
> > > The only other solution I have it to just make the shadowbox big
> > > enough to hold any video size, but then there's a lot of white space
> > > in the shadowbox when the video is smaller than this.  Here are a few
> > > pages that use the shadowbox that show the problem:
>
> > >http://www.pcwb.com/catalogue/item/A0234261<- Biggest 
> > >sizehttp://www.pcwb.com/catalogue/item/3DCONX01<- Most 3D Connexion
> > > videoshttp://www.pcwb.com/catalogue/item/WAC123<- Most videos on the site
> > > are this size

Reply via email to