Leander Hanwald wrote:
> Hi Fabian,
>
> thx, sound good, but doesn't work here ;)
>
> (qooxdoo 0.7)
>
> alert(this.getIFrame()); //.scrollBy(5000,5000);
> -> shows "[object qx.ui.embed.iframe]"
>
> alert(this.getIFrame().getIframeNode());
> -> shows "[object HTMLIFrameElement]"
>
> alert(qx.html.Iframe.getWindow(this.getIFrame().getIframeNode()));
> -> shows "null"
>
> alert(this.getIFrame().getContentWindow());
> -> shows "null"
>
> Did I miss anything?
>
>   

I'm not sure what your 'getIFrame()' method does, but let me elaborate
on what Fabian wrote:

var myIframe = new qx.ui.embed.Iframe;  // this is your Iframe object
from within your qooxdoo app
myIframe.setSource("http://qooxdoo.org";);  // you need this to have a
ContentWindow!
var theContentWindow = myIframe.getContentWindow(); // I've used this
call before, worked for me
// or:
var theContentWindow = qx.html.Iframe.getWindow(myIframe); // should be
same as above

theContentWindow.scrollBy(...); // use it

A few more notes:
o you need a document 'setSource'd or even loaded in your iframe for
getContentWindow to return something useful
o if your 'getIFrame()' method returns a vanilla Iframe object it's no
surprise getContentWindow() returns null
o so it might be a good idea to wrap the call to getContentWindow() into
an event handler that handles the "load" event of the iframe
o I'm not sure the 'getIframeNode()' method you used returns something
usable for your problem

=Thomas

> Fabian Jakobs wrote:
>   
>> Hi Leander,
>>   
>>     
>>> Hi all,
>>>
>>> did anyone has an example how to scroll an iframe in qooxdoo (via the
>>> page that opens the iframe, not from inside of the iframe)?
>>>
>>> Scrolling seems to be integrated in html for an iframe via scrollBy,
>>> which is related to a window but also to an iframe (but not allways at
>>> it seems).
>>> Qooxdoo seems not to integrate this, or did it?
>>>
>>> If qooxdoo can not do this, how could I access the scrollBy function of
>>> the Iframe directly? I tried it with getIframeNode() but the system sais
>>> that the result object had no scrollBy() function.
>>>
>>>   
>>>     
>>>       
>> scrooBy id defined in the window object 
>> <http://developer.mozilla.org/en/docs/window.scrollBy> so you need the 
>> window object of the IFrame. You can get it using  getContentWindow() 
>> <http://demo.qooxdoo.org/current/apiviewer/#qx.ui.embed.Iframe~getContentWindow>
>>  
>> method of the qooxdoo IFrame widget or using the static method 
>> qx.html.Iframe.getWindow() 
>> <http://demo.qooxdoo.org/current/apiviewer/#qx.html.Iframe~getWindow>.
>>
>>
>> Best Fabian
>>
>>   
>>     
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>
>>>
>>>   
>>>     
>>>       
>>   
>>     
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to