• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

Need some xml / javascript help



How can I put this in between xml tags? If I just stick it in it messes up the site. It is a flash/xml site by the way.


<script src="https://www.crossloop.com/widgetjs/pro_contact_widget.js?accountid=1144293" type="text/javascript" charset="utf-8"></script>
0
DantechIT
Asked:
DantechIT
  • 7
  • 3
1 Solution
 
sonawanekiranCommented:
The term CDATA is used about text data that should not be parsed by the XML parser.
Characters like "<" and "&" are illegal in XML elements.
So you can use like this in xml

<root>
  <child>
  <![CDATA[
    <script src="https://www.crossloop.com/widgetjs/pro_contact_widget.js?accountid=1144293" type="text/javascript" charset="utf-8"></script>
  ]]>
  </child>
</root>
0
 
DantechITAuthor Commented:
thank you for the reply!
ok, so this is where I want to put that script. I tried putting what you said but it didn't work. I'm a bit confused.


<pageText><![CDATA[
Ideal solutions
]]></pageText>

<pageText><![CDATA[
<a href="#">
<font color="#7794a4">></font>  Ultrices posuere cubilia urae uspendis<br>
<font color="#7794a4">></font>  At pharetra augue nec augue am<br>
<font color="#7794a4">></font>  Tincidunt ac, viverra sed, nulla onec<br>
<font color="#7794a4">></font>  Quisque diam lorem nterdum<br>
<font color="#7794a4">></font>  Scelerisque vitae, pede onec eget tela<br>
<font color="#7794a4">></font>  Lacinia fermentum onec in velit vel<br>
<font color="#7794a4">></font>  Vestibulum iaculis lacinia est roin dictu<br>
<font color="#7794a4">></font>  Fusce euismod consequat ante
<br><br>
<font color="#ffffff"><a href="asfunction:_root.more_click_func,1">> more info</a></font>
]]></pageText>
0
 
DantechITAuthor Commented:

I also tried this but it didn't work.




<script type="text/javascript">
<![CDATA[
  <script src="https://www.crossloop.com/widgetjs/pro_contact_widget.js?accountid=1144293" type="text/javascript" charset="utf-8"></script>
]]>
</script>
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
sonawanekiranCommented:
<script type="text/javascript">
<![CDATA[
  <script src="https://www.crossloop.com/widgetjs/pro_contact_widget.js?accountid=1144293" type="text/javascript" charset="utf-8"></script>
]]>
</script>

should be

<![CDATA[
  <script src="https://www.crossloop.com/widgetjs/pro_contact_widget.js?accountid=1144293" type="text/javascript" charset="utf-8"></script>
]]>


Or Share your file
0
 
DantechITAuthor Commented:
file attached. For some reason when I do it nothing shows up and it breaks the whole site.


 tfile-main.xml

0
 
DantechITAuthor Commented:
around line 452 by the way.
0
 
sonawanekiranCommented:
Nothing wrong with xml
0
 
DantechITAuthor Commented:
what do you mean?

0
 
DantechITAuthor Commented:
I uploaded the xml file without my addition of the script. Every time I put it in it broke the site, or at least the formatting of the site.
0
 
DantechITAuthor Commented:
Can someone please help me with this, let me know what I am doing wrong. I have been stumped on this for the past 2 days and need to move on.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now