USING XT FUNCTIONS
IN HTML CODE
The XT functions can be used in html scripts in some unusual ways.
This example will put a date stamp on a textarea input.
-Html Code-
<textarea rows="3" cols="17">
<xt id="tdate" format="Y-m-d H:i" tzone="0"/>
</textarea>
Which produces this.
More about time and date
_____
This example will put your user-agent string in a text input box.
Note the odd nesting and the use of single quotes ' '
this is for xhtml compatibility and because double quotes " " are used in the XT function.
(The " " and the nesting are not reproduced in the compiled code as XTgem evaluates the XT function before compiling the html/xhtml then replaces the XT function with it's output.)
-Html code-
<input type="text" name="xtip" value='<xt id="browser" detail="3" />' />
_____
which produces this.
_____
This example puts a counter on a submit button.
-Html code-
<input type="submit" value='Total <xt id="counter"type="4" /> views' />
_____
Which produces this.