CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 dynamic tabs

Print topic Send  topic

Author Message
maclonghorn

Posts: 22
Posted: 03/05/2010, 5:38 AM

I am trying to display a screen with a tabbedview with several tabbedtabs. The first tab has the main information about a property, then the other tabs are the previous years' tax information. So the tabs are:

Property Details
2009
2008
etc

When 2010 data is available in the database, I want to show that tab as well. Is there a way to dynamically generate the next year in a tab?
View profile  Send private message
maclonghorn

Posts: 22
Posted: 03/07/2010, 7:27 AM

Anyone have an idea about this?
View profile  Send private message
Edigital

Posts: 5
Posted: 03/08/2010, 9:06 AM

I suggest to use this tool instead, dynamic tabs


http://www.codechargetools.com/product.php?product_id=6

Regards

_NJHO



_________________
----------just learning!!
View profile  Send private message
maclonghorn

Posts: 22
Posted: 03/08/2010, 10:54 AM

How is the CCT tree tool any different from the built-in directory builder in CCS? Plus, I'm looking to generate Yahoo Tabs, not a hierarchical tree structure. That said, I tried inserting a Yahoo Tab View/Tabs in a CCS directory control, but it didn't work. That might be something to pursue though.

Has anyone tried combining these two features?
View profile  Send private message
pbrad

Posts: 58
Posted: 03/18/2010, 5:11 AM

Hi,

I don't know if you have resolved this yet but I just did an implementation that was quite similar. I use Yahoo tabs and before showing the page, I fire off an event:

Global $Tpl;
$tab=CCGetParam(tab,'0');
$db = new clsDBWebPort();
$prodid =CCGetParam("product_id","");
$SQL = "SELECT * FROM store_product_tabs WHERE product_id = $prodid ORDER BY tab_index ";
$db->query($SQL);
$code.="<script type='text/javascript'>
(function() {
var tabView = new YAHOO.widget.TabView();";
while($db->next_record() ){
$label = $db->f("tab_label");
$index = $db->f("tab_index");
$content = $db->f("tab_content");

$code.="tabView.addTab( new YAHOO.widget.Tab({
label: '$label',
dataSrc: 'ProductTab.php?product_id=$prodid&tab_index=$index',
cacheData: true,

}));";
}
$code.="\n";
$code.="tabView.addTab( new YAHOO.widget.Tab({
label: 'Send to Friend',
dataSrc: 'SendtoFriend.html',
cacheData: true,

}));";
$code.="tabView.set('activeIndex',$tab);
tabView.appendTo('container');
})();";
$code.="</script>";
$Tpl->setvar("vartest", $code);

The first tabs to be shown are drawn from a table in the database an tabs keep getting built as long as there are related fields, the last tab is always there(Send to Friend) and the content is drawn from an external html table.

Hope this helps,
Pete
_________________
Pete

CCS 4
MySQL
PHP
View profile  Send private message
maclonghorn

Posts: 22
Posted: 03/23/2010, 6:34 AM

pbrad
Very nice. I thought this might be the way to do it (ie, dynamic javascript) but I wasn't sure how that would work. I'll give this a shot. Thanks for the tip! I would think this would be useful for many others.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.