Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding chat to our website

    Hello,

    I am very new to javascript, and I'm having a hard time finding a way to easily add some chat code to our website without manually adding it to every page.

    Here's the deal: I need to add this code to every page of our website:
    Code:
    <div id="cihfi9" style="z-index:100;position:absolute;"></div><div id="schfi9" style="display:inline;float:right;"></div><div id="sdhfi9" style="display:none"></div><script type="text/javascript">var sehfi9=document.createElement("script");sehfi9.type="text/javascript";var sehfi9s=(location.protocol.indexOf("https")==0?"https://secure.providesupport.com/image":"http://image.providesupport.com")+"/js/mrcuser/safe-standard.js?ps_h=hfi9\u0026ps_t="+new Date().getTime();setTimeout("sehfi9.src=sehfi9s;document.getElementById('sdhfi9').appendChild(sehfi9)",1)</script><noscript><div style="display:inline"><a href="http://www.providesupport.com?messenger=mrcuser">Live Support</a></div></noscript>
    I would like the chat icon to appear at the top of each page next to our main menu links. Our main menu links are called from one javascript file. I would like to figure out a way to add this code to the javascript file, so I only have to add it once. The javascript file only has one line of code: document.write(all of our main menu links).

    Is there a way to add the chat code to the main menu javascript file so that the chat icon will appear on every page, or is this impossible?

    Thanks for your help!

  • #2
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,172
    Thanks
    19
    Thanked 65 Times in 64 Posts
    You can just add that code into your document.write() statement.

  • #3
    New to the CF scene
    Join Date
    Sep 2011
    Location
    India
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Many chat software providers provide chat code and we just place this code on pages. Even Live2support helps to add chat code on web pages.


  •  

    LinkBacks (?)


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •