Hi Team,
I added a textarea field in my liviste component and while retrieving the value from my text field, some extra characters are appending.
Can you please provide me any suggestion that how to resolve this issue?
Thanks,
Chandra
You need to provide more information, such as:
Hi Zarrin,
Thanks for the reply.
Below is my content XML code part:
<Data> <Datum ID="D01" Type="Textarea" Name="Javasript Code" Changed="true">**FloodLight Starts here**&lt;script src="//platform.twitter.com/oct.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt;twttr.conversion.trackPid('nts7t', { tw_sale_amount: 0, tw_order_quantity: 0 });&lt;/script&gt; &lt;noscript&gt; &lt;img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=nts7t&amp;p_id=Twitter&amp;tw_&hellip;" /&gt; &lt;img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=nts7t&amp;p_id=Twitter&amp;tw_sale_amount=0&amp;tw_order_quantity=0" /&gt; &lt;/noscript&gt; &lt;br /&gt;</Datum> </Data>
Appearance XSL part:
<!DOCTYPE html-entities SYSTEM "http://www.interwoven.com/livesite/xsl/xsl-html.dtd"> (http://www.interwoven.com/livesite/xsl/xsl-html.dtd'%3E)<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- Skin: Default XSL --> <xsl:include href="http://www.interwoven.com/livesite/xsl/HTMLTemplates.xsl"/> <xsl:include href="http://www.interwoven.com/livesite/xsl/StringTemplates.xsl"/> <xsl:template match="/"> <xsl:value-of select ="/Properties/Data/Datum[@ID='D01']" disable-output-escaping="yes" /> </xsl:template></xsl:stylesheet>
But on the page the javascript code is not rendering in the page, it is coming as same code values.Please refer below.
**FloodLight Starts here**<script src="//platform.twitter.com/oct.js" type="text/javascript"></script> <script type="text/javascript">twttr.conversion.trackPid('nts7t', { tw_sale_amount: 0, tw_order_quantity: 0 });</script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=nts7t&p_id=Twitter&tw_…" /> <img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=nts7t&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" /> </noscript>
I don't understand what you mean by "it is coming as same code values".
When entering code, could you please use the "insert code" button to keep the formatting?
It would help if you showed what you are getting versus what you expect, for example:
I'm getting:
// something is wrong with this code
I expect:
// this is what I think it should be
I am not able to attach the screen that how the javascript code is rendering in my page.
Javascript code :
<script src="//platform.twitter.com/oct.js" type="text/javascript"></script> <script type="text/javascript">twttr.conversion.trackPid('nts7t', { tw_sale_amount: 0, tw_order_quantity: 0 });</script><noscript> <img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=nts7t&p_id=Twitter&tw_…" /> <img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=nts7t&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" /> </noscript>
And it is rendering as same in my webpage also, accutually it shoud come as how it looks in html page but it is coming as above code only not converted/ rendered to how it looks in htmlpage.
may I know why it is not rendering or is there any other way to include my javascript code in a livesite component?
We have some people use generic text blocks for JS, works fine. Though all of these are DCRs that do not use TinyMCE. It is possible that the native SP is causing an issue but i have never heard of that. I have some fairly complex webpages that work with this. The XSL is quite simple:
<xsl:value-of select="Body" disable-output-escaping="yes"/>
Make a single page, 1 component which reads from a text block (DCR or native) and a simple XSL and see if the behavior still exists.