I'm doing some proof on concepts to ensure that there are no scalability issues down the line.
Essentially I have 5 tabs, all with dynamic content. Some of the tabs include an external page (.cfm page) which query a DB.
Is there a way to control the tabs and how they render the content? i.e. I would only want the active tab to render content back to the browser. The other 4 tabs would remain content free until clicked.
deferredRender seems like it might be on the right lines but on reading it doesn’t seem to fit my needs.
Odd, i'm still seeing the CF include on tab 2 (example below) hitting the DB even though tab 2 not active.
I think its becuase the CF include is in the DIV's and will just get rendered as the page is processed. I have tried putting the CF include inside the JS, however the content of the CF is quite complex and it breaks the page....
Is there another option I could try?
Many Thanks
Sparky
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My Page</title>
<link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" />
<style type="text/css">
html, body
{
font:normal 12px verdana;
}
</style>
// Initialization functions
// Listener that ensures the page has loaded before it it rendered to the browser
Ext.onReady(function()
{
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
// viewable application area (the browser viewport)
var viewport = new Ext.Viewport
Does that mean the concept of not showing the dynamic content of an inactive tab is not possible? i.e. I would have thought that only the tab graphic would need to be displayed if its inactive... except when clicked (active), in which case the whole panel associated with that tab would render?
Originally Posted by Animal
So that will be there anyway. You can't unrender it.
Assume that is only the case if it's out side if the JS? i.e. in the div as in my example. Is there a way to have complex page data included within the JS? When I use a HTML : '<cfinclude template="my.cfm">' the page breaks.
The page i'm including contains escape characters (as far as javascript is concerned). So in this example below, which is based on the API docs.. When the script is processed, I get "unterminated string literal" at the point when the CF include brings the complex content in. Interestingly, it also seems that tab 2 is being rendered even though it is not the first child, otherwise I would not see the error until i clicked on tab 2.
<script type="text/javascript">
// Initialization functions
// Listener that ensures the page has loaded before it it rendered to the browser
Ext.onReady(function()
{
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
// viewable application area (the browser viewport)
var viewport = new Ext.Viewport