Which Block Likes JavaScript?

avi.fhima's Avatar

avi.fhima

12 Aug, 2015 06:27 AM

I am trying to include some inline JavaScript with my HTML (It has worked before using the Text Block) This particular JavaScript code has the '&&' characters which introduces your friendly XML Parse Error. (And yes, even when using CDATA) Any (simple) suggestion(s)? (This is for Cascade Server v7.6). Thank you.

  1. 1 Posted by Ryan Griffith on 12 Aug, 2015 12:52 PM

    Ryan Griffith's Avatar

    Hi,

    I would suggest using an XML Block to avoid potential issues of your content being escaped. If the code is still being rewritten, try surrounding the code with a #protect code section.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by avi.fhima on 13 Aug, 2015 06:40 PM

    avi.fhima's Avatar

    Hi

    Thank you for the great feedback. Just FYI: I have followed your instructions and it didn't work with #protect (still getting the same XML Parse Error), however I did succeed by using #passthrough(and using the XML block).

    Thanks!

  3. 3 Posted by Ryan Griffith on 13 Aug, 2015 06:44 PM

    Ryan Griffith's Avatar

    Not a problem at all, I am glad to hear I was able to point you in the right direction.

    If you are still seeing the error and need that JavaScript to execute within Cascade, try the <![CDATA[#protect version, which will ensure the code is skipped during any XML validation.

    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.

    Have a great day!

  4. Ryan Griffith closed this discussion on 13 Aug, 2015 06:44 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac