Title: Adding Javascript (chat code) to iframe
Last modified: August 22, 2016

---

# Adding Javascript (chat code) to iframe

 *  [jteusa](https://wordpress.org/support/users/jteusa/)
 * (@jteusa)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-javascript-chat-code-to-iframe/)
 * I’m working on [http://helpflow.net/preview/](http://helpflow.net/preview/).
 * The iframe popup works exactly as needed. I used the below to link including 
   class=”fancybox-iframe” as instructed.
 *     ```
       <a class="fancybox-iframe" href="http://www.executane.com">Click Here to see a preview</a>
       ```
   
 * But I want to add the below website chat code so that it shows up on the iframe
   on bottom right of window (i.e. bottom right of iframe, not bottom right of the
   website being i framed).
 * What file in plugins folder do I edit to make this happen? What do I need to 
   input?
 * Been troubleshooting all morning with adding the code in various places, adding
   it as chatcode.js to the plugins folder and then calling that, with no success.
   I’ve cleaned up everything along the way so there’s not hacking of the code left
   in there, but I can’t figure out how to make this happen.
 * * Please note the chat box you see at the bottom of your browser (not the bottom
   of the iframe) is not the chad code powered by the inframe- it’s on each page
   of the helpflow.net website. Yes, I want the same chat code to appear within 
   the iframe (i’ll be removing it from this page of help flow in the future.
 * Thanks!
 *     ```
       <script type="text/javascript">
       var __lc = {};
       __lc.license = 5349091;
   
       (function() {
       	var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
       	lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.livechatinc.com/tracking.js';
       	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
       })();
       </script>
       ```
   
 * [https://wordpress.org/plugins/easy-fancybox/](https://wordpress.org/plugins/easy-fancybox/)

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

 *  Thread Starter [jteusa](https://wordpress.org/support/users/jteusa/)
 * (@jteusa)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-javascript-chat-code-to-iframe/#post-5598552)
 * I changed the page to another workaround,but will watch for an answer. Thanks!
 *  [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-javascript-chat-code-to-iframe/#post-5598657)
 * I’m not completely sure I understand what you actually want but with any iframe
   embedded web page, if you to have a chat box inside that embedded page you will
   need to implement the chat box on that embedded web page. Make it work there 
   and it will work inside the iframe too.

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

The topic ‘Adding Javascript (chat code) to iframe’ is closed to new replies.

 * ![](https://ps.w.org/easy-fancybox/assets/icon-256x256.png?rev=3188201)
 * [Firelight Lightbox](https://wordpress.org/plugins/easy-fancybox/)
 * [Support Threads](https://wordpress.org/support/plugin/easy-fancybox/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-fancybox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-fancybox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-fancybox/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [iframe](https://wordpress.org/support/topic-tag/iframe/)

 * 2 replies
 * 2 participants
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/adding-javascript-chat-code-to-iframe/#post-5598657)
 * Status: not resolved