Hi Im trying to get a 3rd party livehelp to autofill with joomla users name and email when logged in.
This is the js code to autofill:
LHCChatOptionsPage.attr_prefill = new Array();
LHCChatOptionsPage.attr_prefill.push({'name':'email','value':'test@email.com'});
LHCChatOptionsPage.attr_prefill.push({'name':'username','value':'Username here'});
And this is the php code to get the variables from joomla:
$user =& JFactory::getUser();
$user_name = $user->name;
$user_email = $user->email;
But how do I pass the php variables to js? Or is there a better approach I should be taking?
Any help would be much appreciated!