Info: Including the characters "--" within script in a view file results in a syntax error |
Article Type | Info |
Title | Including the characters "--" within script in a view file results in a syntax error |
| <i>I am trying to write script within a view that uses the decrement operator ("--"). When I save my view, I get a syntax error, "Illegal sequence in comment". Here is an example of my code:</i>
<pre>
<!--#
var counter = 10;
while (counter != 0)
{
counter--;
}
#-->
</pre>
<p>To work around this problem, write your script in a Westside class file, and import that class file into your view to use the function. For more information, see <a href="?Topic=westsidescript/wsscriptclasses" class="mainLink2">Building Westside Script Classes</a>. |
Last Reviewed | February 20, 2015 14:06:11 |
|