I'm trying to load the contents of one page (A) into my main site (M). The loading message appears but the contents of A are displayed. Firebug shows the GET completes and I can break in the callback, which reports success of true. The strange thing is that I can load a different url that does not contain script, only html, and it appears fine.
Not sure what I'm doing wrong here. I've included the relevant code fragments.
Thanks for the reply Condor. I will try that approach.
One follow-up question though to my original technique. You state the js inside /my/sample/url doesn't render anything. What if I added renderTo: 'my_form' to the js inside that page? PCWiz Computer - The Newbies FAQ to Mac OSx86:: on external sites other than InsanelyMac and the OSx86 Project by using Google. using a specialized OSx86 updater package or without restoring the patched http://pcwizcomputer.com/index.php?option=com_content&task=view&id=79&Itemid=45HOME |
I'm just trying to get a better understanding of why that doesn't work because my flawed perceptions makes me think the page is requested, the js gets eval'd, and should be rendered to the div inside the main page.
I was dropped too many times on my head as a baby so my sincere apologies for the newb question.
I found a solution that *works* but I'd like to know what the perceived drawbacks are.
I added the renderTo property to my form panel. I also removed the onReady declaration from the form panel js file. The resulting code is ...
Main app:
The javascript inside /my/sample/url doesn't RENDER anything.
For this I recommend using Ext.Ajax.request to load the js.
In the success handler eval() the result and assign it to a variable.
Next, add() the newly created component to existing layout and call doLayout() (or, if you're not using a layout, use render()).
I believe you need to wrap your script in
Now this can be hell to debug, but you can easily include the above in your main app for debugging purposes, and break it apart when everything is in order. I use a server side solution to ease this process.
Do with as you please...
Thanks for the example DigitalSkyline.
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market |