CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 tpl var replacement works in asp but non php?

Print topic Send  topic

Author Message
kburnett
Posted: 10/24/2002, 10:02 PM

works....
<%
Function site_footer_BeforeShow()
if TemplateFileName = "index.html" then
site_footer.index_footer.Value = "some html stuff"
else
site_footer.index_footer.Value = ""
end if
End Function
%>


does not....

function site_header_BeforeShow() {
global $Tpl;
global $FileName;
if($FileName == 'index.php')
{
$Tpl->non_index_html->SetValue("yehaw");
}else{
$Tpl->non_index_html->SetValue("yehaw?");
}
}

hell, even this does not work....

function site_header_BeforeShow() {
global $Tpl;
global $FileName;
$Tpl->non_index_html->SetValue("yehaw??");
}

what in the world am i missing?
Nicole
Posted: 10/28/2002, 5:41 AM

Hello,
What is "non_index_html"? If it is the field on the form use the following code to assign it a value:
global $form_name;
$form_name->field_name->SetValue("new value");

If it is control (e.g. Label) outside any form use code:
global $control_name;
$control_name->SetValue(123);

If it is custom template variable like {hello}, then use template function to set its value:
global $Tpl;
$Tpl->SetVar("hello", "Hello World!");

kburnett
Posted: 10/28/2002, 7:52 AM

nicole,

once again, you have saved me.

i have been so twisted around with field, label and custom template variable manipulation.

alas, it makes sense.

thanks a million.
kyle

   


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.