PDA

View Full Version : Load new content in viewport panel?



AgentSmith
29 Sep 2009, 10:04 AM
How do I dynamically load new content (replace existing content) in viewport panel?
This doesn't work so not sure what does?

Ext.getCmp('viewport_id').findById('center_region_id').load('Helloworld.html');

Returns error: load is not a function.

Thanks,
AS

hendricd
29 Sep 2009, 10:46 AM
Loading full pages into an existing page is dangerous, and best left to IFRAMES. Have a look at ManageIframe (sig below) if that's what you need.

AgentSmith
29 Sep 2009, 10:51 AM
Help me to understand. How is this dangerous if all I want to do is replace the content of a panel with new content?

hendricd
29 Sep 2009, 10:58 AM
If what you are replacing is a simple HTML Fragment,no problem.

If it's an entire external HTML page, know that there is only ONE <HTML> tag allowed in a single DOM document at a time.

AgentSmith
30 Sep 2009, 4:08 AM
Ok then, what is the syntax for replacing a fragment then?