Reputation: 1374
I can not call the javascript function with the following javascript link. What is the problem here anyone can help me here please.
$buttonMessage = '
<a class="drupalchat-profile-un drupalchat_cng"
href="javascript:void(0)"
onclick="javascript:chatWith('.$pUsername.','.$profile_uid.','.$UserAvatar.','.$onof.')">
</a>';
Upvotes: 0
Views: 37
Reputation: 19780
You've probably some JS errors, and need to add single quotes around your values :
$buttonMessage = '
<a class="drupalchat-profile-un drupalchat_cng"
href="javascript:void(0)"
onclick="javascript:chatWith(\''.$pUsername.'\',\''.$profile_uid.'\',\''.$UserAvatar.'\',\''.$onof.'\')">
</a>';
Upvotes: 3