Interspire Product Knowledge Base

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Remove from favorites Remove from favorites

Remove Highlighting Remove Highlighting

Edit this Article

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?

Thank you for rating this answer.

How can I add <script> tags using the writeHTMLContent or InsertHTML function?

You may want to add a <script> tag to the HTML code you want to insert, such as when inserting a "module" for the end user etc. The simplest way around this is to break the '<script>' and '</script>' text into pieces. Don't forget to also escape any quotes. For example:

myVar = '<'+'script>alert(\'x\')<' + '/script>';

Then simply call the function as per normal:
<input type="button" value="lock Page" onClick="javascript:myDevEditControl.writeHTMLContent(myVar)">

Related Articles

No related articles were found.


No attachments were found.

Powered by Interspire Knowledge Manager - World's #1 Best Selling FAQ and Knowledge Base Software