Author Topic: Run a script in an HTML Block  (Read 9174 times)

Offline MagicMax

  • Newbie
  • *
  • Posts: 11
  • Karma: +1/-0
    • View Profile
Run a script in an HTML Block
« on: July 10, 2013, 06:02:40 AM »
Hi

I am trying to get this script to run to enable Zopim chat support.

<!--Start of Zopim Live Chat Script--><script type="text/javascript">
window.$zopim||(function(d,s){var z=$zopim=function(c){
z._.push(c)},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');
$.src='//cdn.zopim.com/?1IF68P2tjzn8Pnf9FWxQDw2BZjr9dB6w';z.t=+new Date;$.
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
</script><!--End of Zopim Live Chat Script-->

I am sure it was working previously.

I created a new block with this as source code, saved it and then added it to the home page layout. It is supposed to then contact Zopim servers and show a chat utility at the bottom of the screen.

Am I doing something wrong?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2174
  • Karma: +345/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Run a script in an HTML Block
« Reply #1 on: July 10, 2013, 06:15:48 AM »
hmm...are you sure that you toggle WYSIWYG editor to source-mode on html-block edit page? your code works well for me.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline MagicMax

  • Newbie
  • *
  • Posts: 11
  • Karma: +1/-0
    • View Profile
Re: Run a script in an HTML Block
« Reply #2 on: July 10, 2013, 06:40:27 AM »
Yep just double checked it. Very odd.

 

Powered by SMFPacks Social Login Mod