Hi Kiran,

welcome to qooxdoo!
In your class, you create an instance of qx.ui.embed.Iframe[1], which is 
not to be confused with the browser's native HTML iframe. In order to 
get your Iframe's current URL, all you need to do is

this.__frame.getSource();

in your getFrame method.

qx.bom.Iframe[2] is meant to be used with the native iframe, so it will 
not work here.

[1] http://demo.qooxdoo.org/current/apiviewer/#qx.ui.embed.Iframe
[2] http://demo.qooxdoo.org/current/apiviewer/#qx.bom.Iframe


Regards,
Daniel

kiran babu schrieb:
> Dear folks,
> I am new to development and am using Qooxdoo as the Ajax frame work, I 
> have a specific problem , related to iframe and cross browser communication,
> as shown below I created a class, and in the class i have an iframe to 
> access google page, but when i try to get the current url using 
> qx.bom.Iframe.queryCurrentUrl(this.__frame) as highlited below  gives me 
> a null value, it would be kind of you to throw light on how to access 
> the body in that iframe and the current url, can i use qx.bom.Iframe  if 
> so kindly guide me suitably, thank you for reading the mail and the 
> answer in advance,
> Regards,
> Kiran
> 
> qx.Class.define("home.Home",
> {
>     extend : qx.ui.container.Composite,
>         type : "singleton",
> 
>         construct : function() {
>            this.base(arguments);
>            this.setLayout(new qx.ui.layout.Canvas());
>                this.__frame = new qx.ui.embed.Iframe();
>             
>               this.__frame.addListener("load", function(e) {
>                 this.debug("Loaded: " + this.getSource());
>               });
> 
>               // elastic
>               this.__frame.setSource("http://www.google.com/";);
> 
>               //-------------
>               // radio group
>               //-------------
> 
>               var rd1 = new qx.ui.form.RadioButton("Google").set({value: 
> "http://www.google.com"});
>               var rd2 = new 
> qx.ui.form.RadioButton("Yahoo").set({value:"http://www.yahoo.com"});
> 
>               rd1.setChecked(true);
> 
>               var rbm = new qx.ui.form.RadioGroup(rd1, rd2);
>               rbm.addListener("changeValue", function(e) {
>                 this.setSource(e.getData());
>              
>               }, this.__frame);
> 
>               this.add(rd1, {left: 1});
> 
>               this.add(rd2, {left: 100});
>             
>               this.add(this.__frame, {left: "0%",top:15, width: 
> "100%",height:"93%"});
> 
> 
> 
> 
>            
>           },
>           members :
>           {
>             __frame :null,
>            
>             getFrame: function()
>             {
>               alert(qx.bom.Iframe.queryCurrentUrl(this.__frame));
>               return this.__frame;
>              
>             }
>           },
>           events :
>           {
>             "surfTo" : "qx.event.type.DataEvent"
>           }
> 
>          
>           
>         });
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
> looking to deploy the next generation of Solaris that includes the latest 
> innovations from Sun and the OpenSource community. Download a copy and 
> enjoy capabilities such as Networking, Storage and Virtualization. 
> Go to: http://p.sf.net/sfu/opensolaris-get
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to