cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent Web Application Designer from Replacing Quotes

Former Member
0 Kudos

I have a piece of JavaScript that I use to hide some error display that's not important right now. The problem is if I or someone else makes changes to the web app and saves the Web App Designer will replace the quotes with the HTML encoded quote and it breaks it. Is this something I can turn off?

<script type="text/javascript" >document.getElementById("__MESSAGES_LIST_ITEM_AcMess_scl").style.display = 'none';</script>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The answer was to save in code view and not in the preview mode. If you switch to preview mode then save it will try and "correct" the syntax for you.

Answers (1)

Answers (1)

cornelia_lezoch
Active Contributor
0 Kudos

Hi Robert,

I think you need to add a script item and put your HTML code within that script. Then it will not be changed when the web template is saved.

regards

Cornelia

Former Member
0 Kudos

Thanks for the reply. I already have the JavaScript inside a script tag. When I tried using the script item I could never get it to fire at the proper time. It would fire too early. Even when I put in the option to not fire until onload it would still fire too early. Any other ideas about how to use a script item but have better control over the timing?