• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • 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
 
Kiran SonawaneProject LeadCommented:
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
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
Kiran SonawaneProject LeadCommented:
<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
 
Kiran SonawaneProject LeadCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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