Dave Baker
|
Posted: 10/14/2003, 12:50 PM |
|
Could anyone provide a PHP example for this FAQ?
Thanks! -- Dave Baker
-------------------
How to place dynamic content on a page programmatically?
Products: CodeCharge Studio
Areas: ASP, General
If you want to build HTML snippets programmatically, such as JavaScript, custom controls, dynamic content, etc., you may place custom tag or Label control anywhere within the HTML page, then replace it programmatically at run-time. This can be achieved in several ways (ASP/VBScript):
1. Place a control (such as a Label) on the page and then use "Before Show" event for this control with the following code:
EventCaller.Value = "test"
2. Place a control (such as a Label) on the page and then use any event with the following code:
Label1.Value = "test"
(replace "Label1" with the name of your control)
3. Place custom tag in curly brackets anywhere on the page, for example {my_tag}, then use any event with the following code:
Tpl.Variable("my_tag") = "test"
(replace "my_tag" with the text you placed in curly brackets)
|
|
|
DaveRexel
|
Posted: 10/14/2003, 3:06 PM |
|
::
1. see 2.
2. Place a control (such as a Label) on the page and then use any event with the following code:
When used in Grid/Record/Page component:
global $example_component;
$example_component->Label1->SetValue("test");
(replace "example_component" and "Label1" with the name of your control & component)
3. Place custom tag in curly brackets anywhere on the page, for example {my_tag}, then use any event with the following code:
global $Tpl;
$Tpl->SetVar("my_tag","test");
(replace "my_tag" with the text you placed in curly brackets)
---------------
Hope this helps
Dave
|
|
|
|