PHP Live! Help Desk
» Help Desk Home » How-To and Helpful Info » Multiple chat icons on the same page
Multiple chat icons on the same page

If you'd like to place multiple chat icons on one page, you'll want to have an idea of the HTML Code parts.  The HTML Code to be placed on your website will look similar to:

 

<!-- BEGIN PHP Live! code, (c) OSI Codes Inc. --><span id="phplive_btn_1336164111" onclick="phplive_launch_chat_0(0)" style="color: #0000FF; text-decoration: underline; cursor: pointer;"></span><script type="text/javascript">(function() { var phplive_e_1336164111 = document.createElement("script") ; phplive_e_1336164111.type = "text/javascript" ; phplive_e_1336164111.async = true ; phplive_e_1336164111.src = "https://www.yoursite.com/phplive/js/phplive_v2.js.php?q=0|1336164111|2|" ; document.getElementById("phplive_btn_1336164111").appendChild( phplive_e_1336164111 ) ; })() ;</script><!-- END PHP Live! code, (c) OSI Codes Inc. -->

 

Looking at the code, you will see the button IDs throughout the code.  In this case, the button ID is 1336164111.  Each instance of the chat icon HTML Code should have a different button ID.  Placing two of the same HTML Code with same button IDs will produce undesirable results, or quite simply the chat icon may not function correctly.

 

In order to place two chat icon HTML Codes on the same page, you'll want to generate TWO different HTML Codes with different button IDs.

 

  1. Login to the PHP Live! setup area and click the "HTML Code" top menu.  The system will generate an HTML Code to be placed on your webpage.  This code will be for the first instance.
  2. Copy the HTML Code and paste it to your webpage.
  3. Reload the "HTML Code" page and the system will generate a new code with different button ID.  This new code will be for the second instance.
  4. Copy the new HTML Code and paste it to your webpage for the second chat icon image.
  5. On your wepage, you will now see two chat icons at their proper designated locations.

 

Convenient method to reference the launching of the chat window using an existing HTML Code on the webpage.

 

Sometimes you may want to place various texts on the website that launches the chat window, without having to place many HTML Codes on the same page.  If you already have an existing chat icon HTML Code on your webpage, you can reference the JavaScript chat window launch function directly.  For instance, on the above HTML Code, you will see within the code:

 

<span id="phplive_btn_1336164111" onclick="phplive_launch_chat_0(0)" style="color: #0000FF; text-decoration: underline; cursor: pointer;">

 

You'll notice the onclick="phplive_launch_chat_0(0)"  JavaScript event.  This is the function to launch the chat window.  Thus, if the chat icon HTML Code is present on the webpage already, take a look at the code to view the function it calls to launch the chat.  In this case, the function is phplive_launch_chat_0(0)

 

Using this function, you can have many live chat clickable links on your webpage simply by calling this function.  As an example:

 

<a href="JavaScript:void(0)" onClick="phplive_launch_chat_0(0)">click to chat with us</a>

 

This link will reference the existing chat launch function and open a live support chat window without having to place another entire HTML Code on your site.  You can simply reference the existing HTML Code JavaScript chat launch function.

Was this documentation helpful to you?
© OSI Codes Inc. All Rights Reserved  /  Privacy Policy  /  License Agreement  /  download live chat icons  /  help desk  /  contact us » follow us at Google+ Google Plus
Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in /var/www/vhosts/phplivesupport.com/inc_footer.php on line 51