Differences

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

Link to this comparison view

dev:web:tt_js_wordwrap [2015/04/27 13:27] – angelegt jsdev:web:tt_js_wordwrap [2015/04/27 13:30] (current) js
Line 1: Line 1:
 +====== Template Toolkit and Javascript ======
  
 +I have trouble with wordwrap of source in my template toolkit files with embedded javascript.
 +
 +Solution: with the plus sign (+) I splitt the string in more than one line!
  
 <code javascript> <code javascript>
Line 23: Line 27:
 </script> </script>
 </code> </code>
 +
 +It is better to read than
 +
 +<code javascript>$("#lxmodel").html('<% FOREACH model IN rzconfig.rz.${vienv}.lx.ver.$lxver.model.keys.sort %><% IF rzconfig.rz.${vienv}.lx.ver.$lxver.model.$model.default == "true" %><option value="<% model %>" selected><% model %></option><% ELSE %><option value="<% model %>"><% model %></option><% END %><% END %>');</code>