iframe cannot use the whole height of a tab content within a layout wireframe

View: New views
3 Messages — Rating Filter:   Alert me  

iframe cannot use the whole height of a tab content within a layout wireframe

by Michel Corne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I cannot get an iframe to use the whole height of a tab content within
a layout wireframe. I used the fix I found in one of the posts:

//Method to Resize the tabview
YAHOO.example.app.resizeTabView = function() {
var ul = YAHOO.example.app.tabView._tabParent.offsetHeight;
Dom.setStyle(YAHOO.example.app.tabView._contentParent, 'height',
((YAHOO.example.app.layout.getSizes().center.h - ul) - 2) + 'px');
};
//Listen for the layout resize and call the method
YAHOO.example.app.layout.on('resize', YAHOO.example.app.resizeTabView);

It does not work in this case.

I also adapted it to actually change the iframe height:

var resizeTabView = function() {
var ul = tabview._tabParent.offsetHeight;
var el = new YAHOO.util.Element('url');
var height = (layout.getSizes().center.h - ul) - 5;
el.set('height', height);
}

And I also tried to change the clientheight, and the scrollheight. No
success! I did verify with firebug that the resize envent is captured
and that the iframe height gets changed.

See the demo at http://mcworks.ovh.org/page_layout_source4.html .
Resizing has no effect. It should actually adjust the size of the
iframe as the application is lauched.

Is there a way to fix that?

Thanks,
MC


Parent Message unknown Re: iframe cannot use the whole height of a tab content within a layout wireframe

by dav.glass :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

mcorne --

Try this:
el.set('height', height + 'px');


When setting the height you need to specify the unit..

Dav
 Dav Glass
dav.glass@...
blog.davglass.com




+ Windows: n. - The most successful computer virus, ever. +
+ A computer without a Microsoft operating system is like a dog
without bricks tied to its head +
+ A Microsoft Certified Systems Engineer is to computing what a
McDonalds Certified Food Specialist is to fine cuisine  +



----- Original Message ----
From: mcorne <mcorne@...>
To: ydn-javascript@...
Sent: Friday, July 4, 2008 10:26:59 AM
Subject: [ydn-javascript] iframe cannot use the whole height of a tab content within a layout wireframe

I cannot get an iframe to use the whole height of a tab content within
a layout wireframe. I used the fix I found in one of the posts:

//Method to Resize the tabview
YAHOO.example.app.resizeTabView = function() {
var ul = YAHOO.example.app.tabView._tabParent.offsetHeight;
Dom.setStyle(YAHOO.example.app.tabView._contentParent, 'height',
((YAHOO.example.app.layout.getSizes().center.h - ul) - 2) + 'px');
};
//Listen for the layout resize and call the method
YAHOO.example.app.layout.on('resize', YAHOO.example.app.resizeTabView);

It does not work in this case.

I also adapted it to actually change the iframe height:

var resizeTabView = function() {
var ul = tabview._tabParent.offsetHeight;
var el = new YAHOO.util.Element('url');
var height = (layout.getSizes().center.h - ul) - 5;
el.set('height', height);
}

And I also tried to change the clientheight, and the scrollheight. No
success! I did verify with firebug that the resize envent is captured
and that the iframe height gets changed.

See the demo at http://mcworks.ovh.org/page_layout_source4.html .
Resizing has no effect. It should actually adjust the size of the
iframe as the application is lauched.

Is there a way to fix that?

Thanks,
MC


------------------------------------

Yahoo! Groups Links




Re: iframe cannot use the whole height of a tab content within a layout wirefram

by Michel Corne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had tried adding 'px' but that does not make any difference. Here is
the issue: the iframe height was set to 100% but it should not be set.
I have a question still! Here is the updated the code:

         var resizeTabView = function() {          
           
            var frame = layout.getUnitByPosition('center')
            var centerHeight = frame.get('height');
           
            var tab = new YAHOO.util.Element('tab2');
            var offset = tab.get('offsetTop');

            height = centerHeight - offset - 12;
           
            var el = new YAHOO.util.Element('url');
            el.set('height', height);
        };
       
I don't understand why I need to remove 12px although I am using the
tab offset. Check out http://mcworks.ovh.org/page_layout_source4.html .
Any idea?

Thanks,
MC

--- In ydn-javascript@..., Dav Glass <dav.glass@...> wrote:

>
> mcorne --
>
> Try this:
> el.set('height', height + 'px');
>
>
> When setting the height you need to specify the unit..
>
> Dav
>  Dav Glass
> dav.glass@...
> blog.davglass.com
>
>
>
>
> + Windows: n. - The most successful computer virus, ever. +
> + A computer without a Microsoft operating system is like a dog
> without bricks tied to its head +
> + A Microsoft Certified Systems Engineer is to computing what a
> McDonalds Certified Food Specialist is to fine cuisine  +
>
>
>
> ----- Original Message ----
> From: mcorne <mcorne@...>
> To: ydn-javascript@...
> Sent: Friday, July 4, 2008 10:26:59 AM
> Subject: [ydn-javascript] iframe cannot use the whole height of a
tab content within a layout wireframe

>
> I cannot get an iframe to use the whole height of a tab content within
> a layout wireframe. I used the fix I found in one of the posts:
>
> //Method to Resize the tabview
> YAHOO.example.app.resizeTabView = function() {
> var ul = YAHOO.example.app.tabView._tabParent.offsetHeight;
> Dom.setStyle(YAHOO.example.app.tabView._contentParent, 'height',
> ((YAHOO.example.app.layout.getSizes().center.h - ul) - 2) + 'px');
> };
> //Listen for the layout resize and call the method
> YAHOO.example.app.layout.on('resize', YAHOO.example.app.resizeTabView);
>
> It does not work in this case.
>
> I also adapted it to actually change the iframe height:
>
> var resizeTabView = function() {
> var ul = tabview._tabParent.offsetHeight;
> var el = new YAHOO.util.Element('url');
> var height = (layout.getSizes().center.h - ul) - 5;
> el.set('height', height);
> }
>
> And I also tried to change the clientheight, and the scrollheight. No
> success! I did verify with firebug that the resize envent is captured
> and that the iframe height gets changed.
>
> See the demo at http://mcworks.ovh.org/page_layout_source4.html .
> Resizing has no effect. It should actually adjust the size of the
> iframe as the application is lauched.
>
> Is there a way to fix that?
>
> Thanks,
> MC
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>


LightInTheBox - Buy quality products at wholesale price