Title: Javascript not working
Last modified: May 23, 2018

---

# Javascript not working

 *  Resolved [iamfansite](https://wordpress.org/support/users/iamfansite/)
 * (@iamfansite)
 * [8 years ago](https://wordpress.org/support/topic/javascript-not-working-22/)
 * Hello,
 * for a client i need to display a current cryptocurrency prices in a table, so
   i need to put this widget in the tablepress
 * <script type=”text/javascript”>
    baseUrl = “[https://widgets.cryptocompare.com/&#8221](https://widgets.cryptocompare.com/&#8221);;
   var scripts = document.getElementsByTagName(“script”); var embedder = scripts[
   scripts.length – 1 ]; (function (){ var appName = encodeURIComponent(window.location.
   hostname); if(appName==””){appName=”local”;} var s = document.createElement(“
   script”); s.type = “text/javascript”; s.async = true; var theUrl = baseUrl+’serve/
   v3/coin/header?fsyms=BTC&tsyms=USD’; s.src = theUrl + ( theUrl.indexOf(“?”) >
   = 0 ? “&” : “?”) + “app=” + appName; embedder.parentNode.appendChild(s); })();
   </script>
 * Unfortunately, it’s not working. I tested other widgets too and they display 
   perfectly, but i need this one.
 * I’m using “[table id=1  responsive=flip convert_line_breaks=false /]” to display
   the table.
 * Thank you so much for your help in advance!
 * Martina Dušková

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/javascript-not-working-22/#post-10314762)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * I’m not sure what you mean. How is this widget supposed to look like? Where exactly
   are you putting this code?
 * Regards,
    Tobias
 *  Thread Starter [iamfansite](https://wordpress.org/support/users/iamfansite/)
 * (@iamfansite)
 * [8 years ago](https://wordpress.org/support/topic/javascript-not-working-22/#post-10315252)
 * Hello,
    thanks for your answer. It should like like this – [https://www.cryptocompare.com/dev/widget/wizard/?type=12&theme=0&custom=%257B%2522General%2522%253A%257B%2522showLogo%2522%253Afalse%257D%257D&fsyms=BTC&tsyms=USD](https://www.cryptocompare.com/dev/widget/wizard/?type=12&theme=0&custom=%257B%2522General%2522%253A%257B%2522showLogo%2522%253Afalse%257D%257D&fsyms=BTC&tsyms=USD).
   As you can see on my test page – [https://test.mytoken.guru/](https://test.mytoken.guru/);
   not working code is in second row, other random widgets works just fine.
 * I put it to table in the administration.
 * Thank you!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/javascript-not-working-22/#post-10316527)
 * Hi,
 * thanks for the links! It seems that this is caused by the `&` symbols being replaced
   by HTML entities. To work around this, I recommend that you add the line
 *     ```
       s.src = s.src.replace("amp;", "");
       ```
   
 * directly before the line
    `embedder.parentNode.appendChild(s);` in the JS code.
 * Regards,
    Tobias
 *  Thread Starter [iamfansite](https://wordpress.org/support/users/iamfansite/)
 * (@iamfansite)
 * [8 years ago](https://wordpress.org/support/topic/javascript-not-working-22/#post-10318133)
 * Hi Tobias,
 * unfortunatelly it did not work either 🙁
 * I’ll try to see if i can use any other way to display this information.
 * Thank you,
    Martina
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/javascript-not-working-22/#post-10318814)
 * Hi Martina,
 * hhm, too bad. I’m really sorry that I could not help with a solution here.
 * Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Javascript not working’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/javascript-not-working-22/#post-10318814)
 * Status: resolved