« Return to Thread: Iframe source change

Re: Iframe source change

by patkar_n001 :: Rate this Message:

Reply to Author | View in Thread

Thanks a lot for quick resolution Matt.

But the problem here is, I have main application which has a container class for buttons and headers etc.
And this container has iframe. And I am loading different smaller applications in this iframe. The design is similar to demoBrowser application.

Application.js extends qx.application.Standalone, container class extends qx.ui.container.Composite and Login page extends  qx.application.Standalone.

Now under these circumstances, when I do qx.core.Init.getApplication() I get Login page's handler and not application.js's handler. Thats why I do not get the iframe.


Can you please help in this regard.

Thanks & Regards
Narasimha


Matthew Gregory wrote:
Hi patkar,
I think I understand your question and it is easy to answer :)

In application.js add a function like this:

getMyFrame : function()
{
   return this.__iframe;
}


then from login.js you can access the iframe by doing this:

qx.core.Init.getApplication().getMyFrame()

HTH,
Matt

patkar_n001 wrote:
> Hello,
>
> I have a main application window split into two panes. The bottom pane has a
> embed IFrame.
>>From a html source opened in the iFrame window i want to change the source
> of the iframe to another html source on a button click event.
>
> For example: In the main application.js I have
> +++++++++++++++++++++++++++++++++++++++++
> this.__iframe.setSource("myapplication/login.html");
> +++++++++++++++++++++++++++++++++++++++++
>
> on a button click in login.js, I need to set the Iframe source to another
> html (home.html).
> Since Iframe object, which is created in application.js, is not available in
> login.js I am not able to
> do the following,
> ++++++++++++++++++++++++++++++++++
> iframe.setSource("myapplication/home.html");
> ++++++++++++++++++++++++++++++++++
>
> Can you please let me know how this can be achieved.
>
> Warm regards,
> Narasimha
>


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

 « Return to Thread: Iframe source change