CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Dynamic table background (RESOLVED)

Print topic Send  topic

Author Message
zecinho

Posts: 24
Posted: 02/23/2010, 5:51 AM

Has somene get work a dynamic table background? I could get dynamic image inside a Label with HTML content but I can't get work a table background.
_________________
Jose Maldonado
View profile  Send private message
datadoit
Posted: 02/23/2010, 7:21 AM

Use the $Tpl variable to accomplish this.

In the table's BeforeShow event:

global $Tpl;

if (this) {
$Tpl->SetVar("Background", "#efefef");
}
else {
$Tpl->SetVar("Background", "egegeg");
}

In the HTML:

<table bgcolor="{Background}">
zecinho

Posts: 24
Posted: 02/23/2010, 9:05 AM

What a cool piece of code. This solve the problem. Thanks datadoit !!
_________________
Jose Maldonado
View profile  Send private message
guiags

Posts: 29
Posted: 02/24/2010, 1:15 AM

Hi
And what am i suppose to do if i want to change the background of some rows (according to their content)
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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