Hi Jim,

thanks for the inspiration :o)
I've created this workaround, i hope this will help other people with this issue...

requested site:
1. insert at the end of the page an element with an ID (e.g. div)
2. create this script block into the head
<script type="text/javascript">
      function scrollToEnd(){
        document.getElementById('pageEnd').scrollIntoView(true);
      }
      window.onload = scrollToEnd;
</script>

now the view is at the end of the page.

application:
1. add the listener "load" to the iframe with a function reference (e.g. setIFrameHeight)
2. the reference function
    setIFrameHeight: function(event){
      var iframe = event.getTarget();
      var timer = qx.util.TimerManager.getInstance();

      timer.start(function(iframe,timerID){
        var currentHeight = iframe.getHeight();
        var element = iframe.getWindow();

        var plusHeight = qx.bom.Viewport.getScrollTop(element);
        iframe.setHeight(currentHeight + plusHeight);
      },
      0,this,iframe,100);
    }

with this function, you add the scrollTop value to the current size of the iframe. The timer is required, because the browser needs a short time to be ready and scroll down (100ms is only an example).

I tested this at Opera 10.5, Firefox 3.6 and IE 8.

Daniel

Am 23.03.2010 21:10, schrieb Jim Hunter:
I am not 100% sure of this, but I remember this question has come up before and the answer is that you can not have the IFrame size itself to the content.

With that said, if you have control over the content of the IFrame, you might be able to write a function, inside the IFrame, to get the size and pass it back to the qooxdoo layer then resize the IFrame to fit. Just a thought.

Jim


On Tue, Mar 23, 2010 at 11:47 AM, Daniel Lenggenhager <[email protected] <mailto:[email protected]>> wrote:

    Hi list,

    I would set the height of an Iframe dynamic... so it should
    display the hole site without scrollbars (y-axis).
    Is there a direct function to set this?
    Or have you got an idea, how I can get/load the information about
    the content height.

    Thanks for all answers.

    Daniel

    
------------------------------------------------------------------------------
    Download Intel&#174; Parallel Studio Eval
    Try the new software tools for yourself. Speed compiling, find bugs
    proactively, and fine-tune applications for parallel performance.
    See why Intel Parallel Studio got high marks during beta.
    http://p.sf.net/sfu/intel-sw-dev
    _______________________________________________
    qooxdoo-devel mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev


_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to