tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/17878-syntax-errorCascade CMS: Discussion 2018-10-18T20:37:31Ztag:help-archives.hannonhill.com,2010-02-09:Comment/367231112015-05-01T14:11:04Z2015-05-01T14:11:04Zsyntax error<div><p>Hi Support,</p>
<p>Just following up on my request. Can you please help?</p>
<p>Thanks,</p>
<p>J</p>
<p>From: Jihae Chung<br>
Sent: Thursday, April 30, 2015 4:38 PM<br>
To: '<a href="mailto:help@hannonhill.com">help@hannonhill.com</a>'<br>
Subject: syntax error</p>
<p>I am using a .js file in Cascade that does this function.</p>
<p>In the script file, it looks fine but when I go to the page that
uses the script file and go to "source" I see that ">" symbol
autocorrects to > and breaks the function. How can I write so
that it doesn't autocorrect ">" symbol??</p>
<p>Thanks,</p>
<p>J</p>
<p>To unsubscribe from this group and stop receiving emails from
it, send an email to <a href="mailto:help+unsubscribe@hannonhill.com">help+unsubscribe@hannonhill.com</a>.</p></div>Jihae Chungtag:help-archives.hannonhill.com,2010-02-09:Comment/367231112015-05-01T14:50:37Z2015-05-01T14:50:37Zsyntax error<div><p>Hi J,</p>
<p>To clarify, is the <code><script></code> tag you provided
within a page, block, or file? If it is in a page or block, how are
you entering the content (eg text field or WYSIWYG)?</p>
<p>Also, have you tried surrounding the code with a <a href="http://www.hannonhill.com/kb/Code-Sections/#protect-code-sections-tags">
CDATA <code>#protect</code> code section</a>? For example, you
would have something like the following:</p>
<pre>
<code><script type="text/javascript"><![CDATA[#protect
$(document).ready(function() {
var bodyHeight = $("body").height();
var vwptHeight = $(window).height();
if (vwptHeight > bodyHeight) {
$("footer#colophon").css("position","absolute").css("bottom",0);
}
});
#protect]]></script></code>
</pre>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/367231112015-05-01T15:02:42Z2015-05-01T15:02:42Zsyntax error<div><p>Hi Ryan,</p>
<p>I used the
<p>Thanks,
<p>J
</p></div>Jihae Chungtag:help-archives.hannonhill.com,2010-02-09:Comment/367231112015-05-01T15:30:16Z2015-05-01T17:21:52Zsyntax error<div><p>Thank you for following up, J. I am glad to hear you were able
to work around the character being encoded.</p>
<p>The character was encoded because the resulting content needs to
be validated as XML. By wrapping the content in a CDATA tag, you
are essentially saying the content within is known to be invalid
XML and won't be validated as such; which should leave the
character intact.</p>
<blockquote>
<p>I used the <code><script></code> tag both in .js page</p>
</blockquote>
<p>So you had the script tag within the <code>.js</code> file? I
think this is technically not valid, but either way the character
should not have been rewritten within a file asset since it is not
validated as XML.</p>
<p>I'm going to go ahead and close this discussion, please feel
free to comment or reply to re-open if you have any additional
questions.</p>
<p>Have a great day!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/367231112015-05-01T16:19:54Z2015-05-01T16:19:54Zsyntax error<div><p>Got it. Thank you!</p></div>Jihae Chung