Re: Iframe getSource doesn't work

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Iframe getSource doesn't work

thron7
jhonny thio wrote:
> Hi..
>
> I want to make a browser application using qooxdoo, maybe like Opera
> or modzilla.

Mh, what exactly are you trying to do? A browser within a browser?
Something like
http://demo.qooxdoo.org/devel/demobrowser/demo/widget/Window_Browser.html ?

>
> Here some of my question :
>
> 1. To handle the content of the website, I use qx.ui.embed.Iframe().
>    This is right ? Or maybe there is another widget that better ?

If you want to set urls to load and let the browser handle all the
rendering, events, etc. then this is the one you want.

>
> 2. If I use Iframe, I use Iframe.getSource() to get the present URL.
>    But Iframe.getSource() always return the first source I surf.
>    Example : I surf to google, then from google search I surf to yahoo.
>              The Iframe.getSource() always return http://google.com.
>
>    Then I use Iframe.queryCurrentUrl(), but it always return null.
>

The problem is the "same origin policy" of the browser: While the
setSource() and getSource() methods only operate on the "source"
property of the qooxdoo Iframe object (which is not updated by location
changes in the underlying DOM object), queryCurrentUrl() can only peek
inside this underlying DOM iframe object *iff* its current location is
from the same domain as the hosting web page. You can check this if you
setSource() the iframe to some page from the same domain and then
navigate to some other pages within the same domain. queryCurrentUrl()
will always give you the current url :).

If you want a browser-within-the-browser that can be both navigated
interactively by the user, but also programmatically by your hosting web
page, then you have to bite the bullet and e.g. create a proxy on your
web server through which all requests to other web pages are tunneled.

Thomas

>    What the right command?
>
> Thank you very Much
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>  


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel