If you have code like
Then goat is erronously set to null during the Design Preview.
Doing without the <!-- and // --> lines fixes things.
However that's not very good practice so here's a workaround.
Create two text Variables StartJavaScriptComment and EndJavaScriptComment containing <!-- and // --> respectively. Don't tick any "Place of Setting" boxes so they effectively become constants.
Then our code block becomes
And we now get clean code with the JavaScript working as expected.
Code:
<script type="text/javascript"> <!-- var goat='<actinic:variable name="ProductID" encoding="perl" selectable="false" />'; // --> </script>
Doing without the <!-- and // --> lines fixes things.
However that's not very good practice so here's a workaround.
Create two text Variables StartJavaScriptComment and EndJavaScriptComment containing <!-- and // --> respectively. Don't tick any "Place of Setting" boxes so they effectively become constants.
Then our code block becomes
Code:
<script type="text/javascript"> <actinic:variable name="StartJavaScriptComment"/> var goat='<actinic:variable name="ProductID" encoding="perl" selectable="false" />'; <actinic:variable name="EndJavaScriptComment"/> </script>
Comment