FAQ - Open Chat Javascript Function

Open Chat Javascript Function

16.11.2017 3378


With the latest version of our products we have brought the chat opener back.

Now you are not bound to the build in opener you can use any elment to open the chat and decide if it should slide up or open in a popup.

<a href="javascript:void(0)" onclick="lcjak_linkOpen(popup,chatid,'language','name','email','message');return false;">Open Chat</a>

You cannot only open the chat with any element you can also pass informations like:

  • popup* (use value 0 for slide up or 1 for popup)
  • chatid* (the chat id from your widget area)
  • language (de)
  • name (the customer name)
  • email (the customer email)
  • message (Some message for example: Support Question)

* Mandatory

Examples

The minimum solution. It will open the chat in a popup and use the chat with ID 1.

<a href="javascript:void(0)" onclick="lcjak_linkOpen(1,1);return false;">Open Chat</a>

Set the language. It will open the chat in a slideup, set the language to German and use the chat with ID 1.

<a href="javascript:void(0)" onclick="lcjak_linkOpen(0,1,'de');return false;">Open Chat</a>

Set the language and customer credentials. It will open the chat in a slideup, set the language to Spanish, use the name José, his email address, set the welcome chat text to "Live Support Chat Question" and use the chat with ID 1.

<a href="javascript:void(0)" onclick="lcjak_linkOpen(0,1,'es','José','jose@email.com','Live Support Chat Question');return false;">Open Chat</a>