logo
Home XtGem- Templates- XtScript- bottom
All of xt:scripts functions and tools can be used to output fully customized javascript
As long as you follow a few rules and work within the constraints and peculiarities of Xtscript
Brackets containing maths or anything that could be evaluated as maths
should either be output with print_raw or broken up so the brackets are on separate lines
semi colons at the end of a print or print_raw line will be ignored so to add a semicolon at the end of a line use ; ; (semicolon space semicolon)
Show in textarea
<!--parser:xtscript-->
var $message=Hello World
# assign a space char to a variable
var $space=call chr $val=32
#assign brackets to variables
var $bra=call chr $val=40
var $ket=call chr $val=41
print <script type="text/javascript">
print document.write("*
print $space$message$space
var $message=call str_ireplace $subject=$message;$search=world;$replace=everyone
print * $message$space
print *<br />"); ;
print document.write $bra'This will also work'$ket; ;                    
print </script>
<!--/parser:xtscript-->
Show in textarea
Reload
Powered by XtGem
About us Contact Forum topÂ