User Tools

Site Tools


en:public:developer:template_system:tags:parameters:jsencode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:public:developer:template_system:tags:parameters:jsencode [2012/11/30 14:41]
igor created
en:public:developer:template_system:tags:parameters:jsencode [2013/01/28 17:42] (current)
admin [Example]
Line 1: Line 1:
-===== JsEncode =====+====== JsEncode ======
  
-Parameter "JsEncode" defines that the value of corresponding variable or result of function will be converted to the format accessible for Javascript-output. Managing characters for Javascript (like quotes, equal signs etc) will be escaped.+Parameter "JsEncode" defines that the value of corresponding variable or result of function will be  
 +converted to the format accessible for Javascript-output. Managing characters for Javascript  
 +(like quotes, equal signs etc) will be escaped. 
 + 
 +**NOTE:** By default the resulting content will be parsed (all <#..> tags will be evaluated) before to apply  
 +this filter. You can control this behavior throught the parameter  
 +[[en:public:developer:template_system:tags:parameters:AnalyzeTagParams]]
  
 ==== Values ==== ==== Values ====
 +
 ^ Value                                                ^ Description ^        ^ Value                                                ^ Description ^       
-| <html><span style="color:#008000">1</span></html>    | Means that value must be javascript-encoded. If something else if specified this parameter will be ignored. |+| <html><span style="color:#008000">1</span></html>    | Means that value must be javascript-encoded. 
 +| <html><span style="color:#008000">0</span></html>    | Means that value must be javascript-decoded. |
  
 ==== Example ==== ==== Example ====
  
-  <#JavascriptVar setValue="var test = 1;">+  <#JavascriptVar setValue="var test = '1';">
   <#JavascriptVar JsEncode="1">   <#JavascriptVar JsEncode="1">
  
 Output: Output:
  
-  var test \u003D 1\u003B+  var test \u00271\u0027;
en/public/developer/template_system/tags/parameters/jsencode.1354272112.txt.gz · Last modified: 2012/11/30 14:41 by igor