CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Template blocks or variable in the header area - javascript

Print topic Send  topic

Author Message
Eric
Posted: 04/15/2004, 5:35 PM

I want to generate a template variable or block in the header area of the HTML template in CCS. For example:

function MyFunction(slink){
<!-- BEGIN TargetCCM -->
var myvar = {myvarfield} ;
<!-- END TargetCCM -->
more js code ...
}

or simply:
function MyFunction(slink){
var myvar = {myvarfield} ;
more js code ...
}

The problem is that the {myvarfield} does not get generated by the code:

$Tpl->Setvar("myvarfield",$value) ;
$Tpl->Parse("TargetCCM ",False); (if in a block)

CCS return an error when using a BEGIN/END block :
"Undefined index: /Record SCMNk/TargetCCM in ....template.php on line 188".

When not using a begin-end block, no error code is generated and no data is generated.

I think that the error is because the path to the block is wrong and CCS can't find it.

I have not been able to find a way to switch the path. has any
one had this problem and found a solution?

Thanks

Eric


thomas2340

Posts: 55
Posted: 04/18/2004, 10:47 PM

hi,

add this code into the before show event of your page, so that ccs can find your block

$Tpl->Setvar("myvarfield",$value) ;
$Tpl->Parse("TargetCCM ",True);

put this into your javascript section in the html template, dont forget to set the $value or for testing change it to "test"

<!-- BEGIN TargetCCM -->
{myvarfield}
<!-- END TargetCCM -->

good luck, thomas



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.