Hi Dave,

This plugin may be more than you need, but...

The UI/Layout widget will automatically position and size an iframe
(or other element) to fill the entire page, OR allow for a header,
footer, or sidebars. The code and markup are dead-simple. Here is an
example with a page-banner and an iframe. Everything is done for you,
including eliminating the 'body scrollbar'...

$(document).ready(function(){
   $("body").layout({
      closable:  false
   ,  resizable: false
   ,  spacing_open: 0
   });
});

<DIV class="ui-layout-north"> [Banner here] </DIV>
<IFRAME class="ui-layout-center" src="myIframe.html" ... >

That's it! I recommend setting an iframe width & height for non-
Javascript browsers, but it's not necessary for Layout. Plus you must
set your preferred iframe options, like scrolling, border, padding,
etc.

Plug-in website: http://layout.jquery-dev.net

Simple iframe demo: http://layout.jquery-dev.net/demos/frames.html

The Layout website itself used iframe pages with a 'banner', like:

http://layout.jquery-dev.net/discuss.html

Hope this helps.

/Kevin

On Jan 26, 6:55 am, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.com> wrote:
> My iframe is also hard-coded.  But here is what I get when I do
> console.log statements ...
>
>                 $('#fileTreeIframe').load( function() {
>                         var $ifbody = $(this).contents().find
> ( 'body' );
>                         console.log($ifbody);              // Outputs
> Object length=1 0=body prevObject=Object jquery=1.2.6
>                         $ifbody.css( 'height','auto' );
>                         console.log($ifbody.height());              //
> Outputs 0
>                         $(this).height( $ifbody.height() );
>                 });
>
> Obviously the troubling thing here is that height is outputting zero.
> Can you provide the HTML that surrounds your hard-coded iframe?  There
> must be something else I'm not setting in the CSS or HTML.
>
> Thanks, - Dave
>
> On Jan 25, 1:53 pm, dbzz <j...@briskey.net> wrote:
>
>
>
> > i have the iframe hardcoded in the html. if you are adding it to the
> > dom with js, it won't get the load event binding. you might try
> > livequery or something like it.
>
> > On Jan 25, 10:21 am, "laredotorn...@zipmail.com"
>
> > <laredotorn...@zipmail.com> wrote:
> > > Hi dbzz,
>
> > > I tried the code you provided, but went from this ...
>
> > >http://screencast.com/t/W8lOtgKO
>
> > > to the iframe disappearing entirely ...
>
> > >http://screencast.com/t/jCTjOLhpeX
>
> > > I put your code in a $(document).ready() block (below).  Are there any
> > > other modifications I should make to get it to display at 100%?
>
> > >         $(document).ready(function() {
> > >                 $('#fileTreeIframe').load( function() {
> > >                         var $ifbody = $(this).contents().find
> > > ( 'body' );
> > >                         $ifbody.css( 'height','auto' );
> > >                         $(this).height( $ifbody.height() );
> > >                 });
> > >         });
>
> > > Thanks, - Dave- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Reply via email to