Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
I have develop simple ReactJS app. It work fine when chat widget status is offline but disappear when online. In my Console it say that LHCCHatOptions is not defined.
This is my code:-
[== Undefined ==]
import React, { Component } from "react";
class Stuff extends Component {
render() {
var LHCChatOptions = {};
LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500};
(function() {
//var LHCChatOptions = {};
//LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500};
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = false;
var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
po.src = '//localhost/livechat/lhc_web/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true/(theme)/1/(survey)/1?r='+referrer+'&l='+location;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
return (
<div>
<h2>STUFF</h2>
<p>Mauris sem velit, vehicula eget sodales vitae,
rhoncus eget sapien:</p>
<ol>
<li>Nulla pulvinar diam</li>
<li>Facilisis bibendum</li>
<li>Vestibulum vulputate</li>
<li>Eget erat</li>
<li>Id porttitor</li>
</ol>
</div>
);
}
}
export default Stuff;
Offline
Hi mhaziq,
thank you for your question.
I am sorry to inform this seems to be out of the free limited support i can give.
You can find more info on my forum signature.
PeopleInside - Live helper chat - free limited forum support!
For commercial support or GitHub [see FAQ here]
If you want to support this open source project, just donate [see support page]
Something wrong with the forum? [contact a superhero]
Offline