View Full Version : loading web page url in panel containig javascript

6 Sep 2010, 10:49 PM
i have very simple problem , i need to load external url page into my panel, url page may have javascript.
currently it work for simple page not having any script. i am using autoload

autoLoad: 'test.htm', -- working (without any script)
autoLoad: 'http://www.google.co.in/', -- not working

i am using simple panel
can any body suggest me solution on this.
i want functionallity like iframe inside panel.

thanks in advance.:)

6 Sep 2010, 10:53 PM
1. You can use:

autoLoad: {url: 'test.htm', scripts: true}
2. You can't autoLoad from a different domain. Instead, use an IFRAME, e.g.

bodyCfg: {tag: 'iframe', src: 'http://www.google.co.in/'}

6 Sep 2010, 11:26 PM
what my actual working is i have web service which generate html web page on another server so response come as url which i want to load in my panel so what is you suggestion to go with, any other way to do it

can any body suggest me way to refresh panel when url changed or new arived

thanks for reply:)

7 Sep 2010, 1:46 AM
how can i set

bodyCfg: {tag: 'iframe', src: 'http://www.google.co.in/'}


html: "<iframe frameborder='0' src='http://www.google.co.in/' width='100%' height='100%' id='iframe-external'></iframe>",

on button click event

7 Sep 2010, 1:54 AM
Configure your panel with:

bodyCfg: {tag: 'iframe', src: Ext.SSL_SECURE_URL}
and in the button use:

panel.body.dom.src = 'http://www.google.co.in/'

7 Sep 2010, 3:21 AM
thanks you save my time thank you very much

8 Sep 2010, 5:33 AM

8 Sep 2010, 5:43 AM
var params = Ext.urlDecode(location.search.substr(1));

8 Sep 2010, 6:03 AM
var params = Ext.urlDecode(location.search.substr(1));

Could you post an example?


Thanks Condor

8 Sep 2010, 6:06 AM
??? That is an exampe!

8 Sep 2010, 6:10 AM
Yah, thanks, It works! :)

24 Nov 2010, 2:38 AM
Hi Condor,

How can I run extjs scripts in iFrame without any ext library loading ?

24 Nov 2010, 2:42 AM
You first would have to copy the Ext reference to the IFRAME window before executing any javascript.

This can be quite tricky, so I recommend using the ManagedIframe user extension for this.